A commonly overlooked strategy is to remove all unnecessary HTML code from the page.
For any given project, you'll have to decide which of these strategies to employ based on the (X)HTML version you're using, and the way the website is going to be used.
(Apparently, I can't post more than one hyperlink per answer since I'm a new user, so these URLs will have to be copied and pasted...I hope that's kosher.)
- In HTML4 and HTML5, for many elements, the closing tag is not required. The opening tag for the body element also isn't required. See:
- The protocol (http:) part of HTTP URLs can be omitted.
With tags like <br>, you can simply leave out the slash used in the XHTML syntax (<br />) unless you actually need to use XHTML.
Here are some examples of small HTML document structures: