* A string literal, delimited by single quotes or double
quotes and not containing any occurrences of the delimiting
character.
NOTE - Some historical implementations consider any
occurrence of the `>' character to signal the end of
a tag. For compatibility with such implementations,
when `>' appears in an attribute value, it should be
represented with a numeric character reference. For
example, `<IMG SRC="eq1.jpg" alt="a>b">' should be
written `<IMG SRC="eq1.jpg" alt="a>b">' or `<IMG
SRC="eq1.jpg" alt="a>b">'.
* A name token (a sequence of letters, digits, periods, or
hyphens). Name tokens are not case sensitive.
NOTE - Some historical implementations allow any
character except space or `>' in a name token.
In this example, is the element name, src is the attribute
name, and `http://host/dir/file.gif' is the attribute value:
<img src='http://host/dir/file.gif'>
A useful technique for computing an attribute value literal for a
given string is to replace each quote and white space character by an
entity reference or numeric character reference as follows:
ENTITY NUMERIC
CHARACTER REFERENCE CHAR REF CHARACTER DESCRIPTION
--------- ---------- ----------- ---------------------
HT Tab
LF
Line Feed
CR
Carriage Return
SP Space
" " " Quotation mark
& & & Ampersand
RFC 1866 Hypertext Markup Language - 2.0 November 1995
For example:
<IMG SRC="image.jpg" alt="First "real" example">
The `NAMELEN' parameter in the SGML declaration (9.5, "SGML
Declaration for HTML") limits the length of an attribute value to
1024 characters.
Attributes such as ISMAP and COMPACT may be written using a minimized
syntax (see 7.9.1.2 "Omitted Attribute Name" in [SGML]). The markup:
<UL COMPACT="compact">
can be written using a minimized syntax:
NOTE - Some historical implementations only understand the minimized
syntax.
3.2.5. Comments
To include comments in an HTML document, use a comment declaration. A
comment declaration consists of `<!' followed by zero or more
comments followed by `>'. Each comment starts with `--' and includes
all text up to and including the next occurrence of `--'. In a
comment declaration, white space is allowed after each comment, but
not before the first comment. The entire comment declaration is
ignored.
NOTE - Some historical HTML implementations incorrectly consider
any `>' character to be the termination of a comment.
For example:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
HTML Comment Example
<!-- Id: html-sgml.sgm,v 1.5 1995/05/26 21:29:50 connolly Exp -->
<!-- another -- -- comment -->
<!>
<!- not a comment, just regular old data characters ->
RFC 1866 Hypertext Markup Language - 2.0 November 1995
=9= |