abdo refky abdo refky - 3 months ago 9
CSS Question

CSS block-quote empty lines

CSS block quote don't add empty lines to the qoute

example :

<blockquote>
this is number 1

this is number 2
</blockquote>


this will appear as the following but the
"" > ""
don't appear and only empty line appear

> this is number 1

>

> this is number 2


i want them empty line to be included on the blockquote .

Answer

A > is a reserved character in HTML. It's used for building tags.

You need to escape it, or the browser will think it's code and not display it.

Use &lt; for <, and &gt; for >.

<blockquote>
this is number 1<br>
&gt;<br><!-- with "greater than" symbol -->
this is number  2<br>
</blockquote>
<hr>
<blockquote>
this is number 1<br>
<br><!-- with just an empty line -->
this is number  2<br>
</blockquote>

From the spec:

5.3.2 Character entity references

Four character entity references deserve special mention since they are frequently used to escape special characters:

  • &lt; represents the < sign.
  • &gt; represents the > sign.
  • &amp; represents the & sign.
  • &quot; represents the " mark.

Authors wishing to put the < character in text should use &lt; (ASCII decimal 60) to avoid possible confusion with the beginning of a tag (start tag open delimiter). Similarly, authors should use &gt; (ASCII decimal 62) in text instead of > to avoid problems with older user agents that incorrectly perceive this as the end of a tag (tag close delimiter) when it appears in quoted attribute values.

Comments