Thread: Code for "<"
View Single Post
  #26 (permalink)  
Old Oct 2nd, 2003, 13:39
u2orange u2orange is offline
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 158
Thanks: 0
Thanked 0 Times in 0 Posts
Stepping back... A final word if that is ever possible?

When you are coding HTML, if you ever use a < or a > character you should always use the correct HTML code, this also goes for any non alphanumeric characters. Example:

< this will work on it's own, but as soon as you do a > the whole sentence will be processed and rendered as... nothing. i.e.,
Code: Select all
<blockquote>Can you <not see> me</blockquote>
will render
Code: Select all
Can you me
to get the result initially wanted, you would need to do:
Code: Select all
<blockquote>Can you &lt;not see&gt; me</blockquote>
will render:
Code: Select all
Can you <not see> me
Also some browsers may not display your document the way it was intended. Possibly not at all. Not all browsers are as lenient as IE.

What could happen is: The browser processes the page, it intercepts a < and now starts looking for a terminating >, but one don't exist! So, it carry on looking but hits the end of the document with the final </body> tag. Your page shows everything up to th < character - There has been an error in the HTML code.

This is why we should use HTML codes.

In a nutshell, Use HTML codes, they don't get processed. - It's your webpage, they are your audience, it's your risk and your reputation.

u2o