Is it possible to include line breaks in the description of a page shown in Google search results?
No. You can't use html; and HTML ignores whitespace (when it's not used inside a text tag) so it doesn't matter if there's a space (\n\r,etc) or not; google parser will just grab the string, strip any bad code and place the text alone.
Take into consideration that Google will grab 150 characters from the description meta tag. You can test it here: http://www.javascriptkit.com/script/script2/charcount.shtml
No, it's impossible.
This shouldn't necessarily be obvious; literal newlines in HTML attributes are valid and meaningful (see https://mcmap.net/q/545627/-how-can-i-use-a-multiline-value-for-an-html-tag-attribute-i-e-how-do-i-escape-newline), and the HTML spec has nothing special to say forbidding them in <meta name="description" ...
elements (see https://html.spec.whatwg.org/#meta-description), and Google even shows an example at https://support.google.com/webmasters/answer/35624?hl=en of this <meta>
description including literal newlines:
<meta name="Description" content="Written by A.N. Author,
Illustrated by V. Gogh, Price: $17.99,
Length: 784 pages">
However, despite this, Google does not respect such newlines; any run of whitespace gets treated as a single space when showing the description in Google Search results. I did a quick experiment with a domain I control and a couple of other applications that respect <meta name="description" ...>
elements - namely, Slack and Facebook - and found that they also behave in the same way, converting newlines I put into the description to spaces. At a glance, it appears to me that this is the unwritten standard.
© 2022 - 2024 — McMap. All rights reserved.