- XHTML elements should be nested correctly.
- Always close tags.
- Elements should be in lower case.
- Tags <html>, <head> and <body> are mandatory in XHTML.
- Enclose all attributes values in quotes.
- Do not use minimization (not only in HTML but in all programming languages).
- Utilize id attribute for naming elements instead of name attribute.
- All XHTML documents should have a DOCTYPE declaration.
There are three kinds of DOCTYPE as follows:
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > - <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
No comments:
Post a Comment