Re: XHTML (was: Chelume)
From: | Mark J. Reed <markjreed@...> |
Date: | Saturday, January 10, 2004, 0:46 |
On Sat, Jan 10, 2004 at 12:31:43AM +0100, Andreas Johansson wrote:
> > 2) Make sure every start-tag has an end-tag. This rule does not apply to
> > empty tags, namely basefont, br, area, link, img, param, hr, input, col,
> > frame, isindex. (If you don't know what some of these are, don't worry about
> > it).
>
> This means p should have one. Annoying.
Yes, because <p> is NOT a separator, it's a container. Instead of
paragraph<p>paragraph, it's <p>paragraph</p><p>paragraph</p>.
> > 3) Replace the ">" at the end of an empty tag with " />".
>
> That's would be major drain on the ol' brain. Esply that space.
Your brain is easily drained, I guess. :)
> > 4) Make sure all start-tags and end-tags are properly nested.
>
> Which means?
This has actually been a requirement all the way back to HTML1; it's
just that browsers have tended to be forgiving about it.
As to what it means, it means that tags have to be closed in the
inverse order they were opened. So, for instance, if you use those
old nasty presentation tags <b> for bold face and <i> for italic,
you have to make something both bold and italic <b><i>like this</i></b>,
not <b><i>like this</b></i>.
> > 6) Make sure attributes like "checked", that don't have values, are
> > written "checked='checked'".
>
> Can't recall last I used a such. Probably involved "table border".
Actually, the <table> border attribute takes a numeric value specifying
the width of the border.
> > 9) Make sure you use the semicolon after an entity reference like á.
>
> I wasn't aware you could do without them before?
Neither was I, actually.
-Mark
Replies