Jessica's HTML Notes

Differences between HTML and XHTML

In XHTML:

- css element selectors = case sensitive (previously weren't)
- stricter code structure requirements (all elements must be closed, no cross-nesting)
- mime type for XHTML may not be recognized by IE
- some older DOM methods may not be available (eg: innerHTML, document.images, document.forms)
- tags have to be closed and paired. For brevity a slash can be used there is not a paired closing tag eg: <br />
- tags should all be lowercase
- attributes must have quotation marks around them eg <div align="center"> is okay but <div align=center> is not

Even if you chose not to use full XHTML and use Strict HTML, you can still use may of the principles of XHTML such as quoting attributes and lowercase tag names

In HTML Strict: tags such as img and br are written without the closing slash. Paragraph <p> and list item <li> should still be closed however (unlike earlier versions of html)

Quirks mode vs. Strict Mode

Semantic HTML