|
HTML Tag and Attribute Reference
|
My first XHTML page
XHMTL is the replacement for HTML according to the W3C. XHTML is just HTML
only it's alot stricter about your code and you're not allowed to use
proprietary tags, say for IE, but, if you knwo HTML then it's a pretty easy
adjustment.
Differences from HTML to remember:
- All tags need to be in lower case because XHTML is case sensitive (that's gonna take some adjusting for me)
- All attributes need to be quoted
- All empty tags (<b>,<br>,<img>,...) are not allowed. Use <b />,<br />,<img />,...
- The first line of every XHTML file must be:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> or
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- Replace <html> with <html xmlns="http://www.w3.org/1999/xhtml">
- The page can't have any errors or it won't show
|