Menu

Quotes and Special Characters

Quotes and Special Characters

When you want to quote someone, HTML gives you two options depending on the length. blockquote is for longer quotes that stand apart as their own block. q is for short inline quotes within a sentence.

Some characters, like the less-than sign or the ampersand, have special meaning in HTML. To display them as plain text, use what is called an HTML entity.

<blockquote>

  The only way to do great work is to love what you do.

</blockquote>

 

<p>She said <q>see you tomorrow</q> before leaving.</p>

 

<p>5 &lt; 10 and the price is &amp;20</p>

Explanation:

  • Browsers add quotation marks around the q tag automatically, so you do not type them yourself.
  • In the last line, &lt; displays as the less-than symbol and &amp; displays as an ampersand. Without entities, the browser would try to interpret those symbols as code.

HTML Tutorial (From Basics to Implementation)

AP

Abhishek Pati





Get in Touch For Details