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 > B
Then <BR> A = A +
1</CODE>
<P> The above statement used
special characters
</BODY>
</HTML>
|
|
Less than
(<)
|
<
|
<HTML>
<HEAD>
<TITLE>Learning HTML </TITLE>
</HEAD>
<BODY>
<CODE>If A > B
Then <BR> A = A +
1</CODE>
<P> The above statement used
special characters
</BODY>
</HTML>
|
|
Quotes
(“ “)
|
"
|
<HTML>
<HEAD>
<TITLE>Learning HTML </TITLE>
</HEAD>
<BODY>
" To be or not to be ? " That is
the question
</BODY>
</HTML>
|
|
Ampersand
(&)
|
&
|
<HTML>
<HEAD>
<TITLE>Learning HTML </TITLE>
</HEAD>
<BODY>
<P> William & Graham went to the fair
</BODY>
</HTML>
|
Comments
Post a Comment