Reply to Re: < > in content

Your name:

Reply:


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 "&lt;"
(ASCII decimal 60) to avoid possible confusion with the beginning of
a tag (start tag open delimiter). Similarly, authors should use "&gt;"
(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.

> &gt; >

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).

> &lt; <
> &amp; &

Yes

> &quot; "

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.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация