What is XHTML?
XHTML is the current version of HTML. It is not very different from HTML 4.0, which will continue to be supported for some time.
Some new rules for XHTML:
- Tags must be in lowercase.
This means that you cannot code tags in UPPERCASE, e.g., <HTML>
Always use lowercase, e.g., <html>
- All values must have quotation marks around the values.
For example, <body bgcolor="green">. The word green has quotation marks around it.
- All tags must be closed.
Previous versions of HTML made us lazy. They did not always require closing tags. For example, in an unordered list, you did not have to use the </li> tag. You do need it in XHTML!
Even single tags require the closing "/" in XHTML, e.g., <br />.
- Use the alt tag on images and the title tag on text links. These tags help identify the purpose of the links for text-only readers.
For example, <img src="logo.gif" alt="Sequoia Seal Image" />
XHTML is not that different from HTML 4.0. Because you are just learning HTML and haven't had the chance to form bad habits, it will be even easier for you!
Back to Week 3