Migrating to XHTML

Throw out what you know about 90s coding, and learn XHTML. See what's gone and what's "the cool thing to use".

Close your tags!

In plain old HTML, you could make a paragraph just by appending <p> to the beginning. Although, most people were stuffing <br>s wherever they wanted. Neither are correct in XML.

Instead of:

<p>Here\'s some text. I think I\'m going to add <br /> line-breaks wherever I want.

You should put

<p>Here\'s some text. I think I\'m going to add <br /> line-breaks wherever I want. </p>

If you've noticed, it's <br />. Why? Because tags that don't have a seperate ending tag need to close themselves so the XML parser knows when it's stopped. (Additionally, you can't stuff <br /> wherever you want either - only in a paragraph.)

The <font> Tag

Remember defining every paragraph with <font>? Well, now it's gone. Instead of a seperate tag for when you want to change the font, color, size, whatever, styles are built-in.

© 2008-2009