Lesson 1.5

Using   Special Characters in HTML Document

You can insert special character into the text of the of the HTLM document. To ensure that the browser does not confuse them with HTML tags, you have to attach escape to the special
Characters.

Special
Characters
Escape codes
Example

Greater
Than  (>)
>
<HTML>
<HEAD>
<TITLE>Learning  HTML </TITLE>
</HEAD>
<BODY>
<CODE>If A  &gt; B  Then <BR>  A = A + 1</CODE>
<P> The above statement  used  special characters
</BODY>
</HTML>

Less than
(<)
&lt;
<HTML>
<HEAD>
<TITLE>Learning  HTML </TITLE>
</HEAD>
<BODY>
<CODE>If A  &gt; B  Then <BR>  A = A + 1</CODE>
<P> The above statement  used  special characters
</BODY>
</HTML>

Quotes
(“ “)
&quot;
<HTML>
<HEAD>
<TITLE>Learning  HTML </TITLE>
</HEAD>
<BODY>
&quot; To be or not to be  ? &quot; That  is  the  question
</BODY>
</HTML>

Ampersand
(&)
&amp;
<HTML>
<HEAD>
<TITLE>Learning  HTML </TITLE>
</HEAD>
<BODY>
<P> William  &amp; Graham went to the fair
</BODY>
</HTML>



Comments

Popular posts from this blog