Meta description new line
Go to solution
Solved by mariushm,
Not sure I understand the question.
You can use ENTER or newline characters in the content attribute and it should work just fine.
If you want to force it to stay on one line, you could use escape individual bytes with the &#number; or &#xHEXCODE; format
An enter is defined as CRLF = carriage return + line feed... 0x0D and 0x0A , \r and \n ... \n is typically enough.
So you could say
<meta name="description" content="First line,
 second line, third line" />
(funny, if you double click the code boxes to edit, the code auto converts the sequence to actual new line)
and if you open the development tools and type in console document.head you will see in the object
firstElementChild: <meta name="description" content="First line,\n second line, third line">
so you can see the browser converted the html escape sequence to \n , the new line / line feed character
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now