There are about ten (X)HTML doctypes. Differences are subtle (and sometimes non-existent). It is recommended that you use the HTML5 doctype:
which triggers standard mode in every browser (even Internet Explorer 6).
<meta> element and
It is not uncommon to find source code with the following line:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
However, all Web browsers (even Internet Explorer 6) will act the same if you reduce it to:
<meta charset="UTF-8" />
HTML comments in scripts
There was once a time in which some browsers understood the
tag and others didn't. This sometimes led to browsers rendering as text what should be interpreted as script. A natural idea was to put scripts as HTML comments. This way, browsers executing scripts would execute them and those who did not understand scripts would just ignore them.
From this era, we inherit things like:
All of this is completely useless nowadays - even browsers which do not execute scripts just ignore
tags. Just write your scripts within between the start and end
tags. Better, insert your scripts as separate files with the
attribute; while you're at it, consider trying the HTML5
Elements which should not be used anymore
The font tag should not be used any more. CSS is preferred to control typography appearance on the elements, targeted by tag or ID/Class attributes..
b, i, u
Exercise discretion when choosing which of these elements to use. Some development-oriented pages advise simply replacing
. It is a bad idea to follow this advice.
is for statements of strong importance, while
is for otherwise emphasized text. For example, it's a bad idea to use
simply to achieve italicization; italic, non-emphasized text can be achieved by using
font-style:italic in your pages' CSS. Similarly, titles of books and works of art are traditionally styled with italic text, but using the
element for these items provides more semantic mark-up than