|
Posted by Alan J. Flavell on 11/13/05 15:20
On Sun, 13 Nov 2005, Davémon wrote:
> JD wrote:
> > Where can I get a list of characters that you're not supposed to
> > enter directly into HTML content? For example, <, >, ", & ? I
> > don't really know how to find it in the Specification.
I'd recommend
http://www.w3.org/TR/html401/charset.html#h-5.3.2
Particularly
Authors wishing to put the "<" character in text should use "<"
(ASCII decimal 60) to avoid possible confusion with the beginning of
a tag (start tag open delimiter). Similarly, authors should use ">"
(ASCII decimal 62) in text instead of ">" to avoid problems with
older user agents that incorrectly perceive this as the end of a tag
(tag close delimiter) when it appears in quoted attribute values.
> google: "html character entities"
Not really. There's dozens of those, only a tiny few of which relate
to markup-significant characters.
> > >
Well, you *can* use that, but I can't think of a context where you're
forced to use it. As the spec says, it's a possible workaround for a
bug in some old browsers (I'd hope they're all obsolete by now).
> < <
> & &
Yes
> " "
Only necessary in a specific context (attribute value delimited by
quotes).
> ? is allowed isn't it ?
But the question wasn't whether &-notation is *allowed*, but where
it's needed.
Navigation:
[Reply to this message]
|