4 Relevance: requirements and recommendations

In this section, we begin the specification of HTML 4.0, starting with an agreement between authors, documents, users and user agents.

The keywords "NEEDED", "DO NOT NEED", "NEEDED", "FOLLOWS", "NOT SHARED", "RECOMMENDED", "POSSIBLE" and "OPTIONAL" in this document should be interpreted as described in [RFC2119] . However, for ease of reading, these words in this specification are not printed in uppercase.

Sometimes the authors of this specification give recommendations to users and their agents. These recommendations are not normative and compliance with this specification does not depend on their implementation. These recommendations are contained in the expressions "We recommend ...", "This specification recommends ..." and the like.

4.1 Definitions

HTML document
An HTML document is an SGML document that meets the constraints imposed by this specification.
Author
The author is a person, or program, writing or generating documents in HTML format. The authoring tool is a separate case of the author, namely the program that generates the HTML code.

We recommend authors to create documents that correspond to strict DTDs , and not other DTDs defined by this specification. For more information about the DTDs defined in HTML 4.0, see the version information section.

User
A user is a person interacting with a user agent to view, listen, or otherwise use the generated document in HTML format.
User agent
A user agent is any device that interprets documents in HTML format. User agents include visual browsers (text and graphics), non-visual browsers (audio, Broyling), search engines, proxies, etc.

The corresponding user agent for HTML 4.0 is an agent that meets the mandatory conditions ("must") of this specification, including the following:

  • The user agent should avoid imposing arbitrary length restrictions on the literals of attribute values ​​(see the section on capabilities in the SGML Announcement section). Introductory information on the attributes of SGML can be found in the section on defining attributes .
  • The user agent must ensure that the generation of the image does not change due to the presence or absence of the start and end tags, if the HTML DTD indicates that they are optional. For an introduction to SGML elements, see the definition of elements .
  • For compatibility with previous versions, we recommend that the HTML 4.0 interpretation tools support HTML 3.2 (see [HTML32] ) and HTML 2.0 (see [RFC1866] ).
Error conditions
This specification does not define how its corresponding user agents handle common error states, including actions in the event that they encounter elements, attributes, attribute values, or combinations not specified in this document.

However, for information about the recommended error handling, refer to the information about the invalid documents .

Unwanted
An unwanted element or attribute is an element that is obsolete due to the use of new constructions. Unwanted elements are defined in the reference manual and are clearly marked as undesirable. Unwanted items may become obsolete in future versions of HTML.

User agents should still maintain unwanted items to ensure compatibility with previous versions.

The definitions of elements and attributes are explicitly indicated if they are undesirable.

This specification contains examples that show how you can avoid using undesirable elements. In most cases, this depends on the user agent's support for style sheets. In general, authors should use style sheets to get stylistic effects and formatting effects instead of HTML presentation attributes. The attributes of the HTML view are not desirable when there is an alternative to style sheets (see, for example, [CSS1] ).

Obsolete
An obsolete element or attribute is an element or attribute whose support by user agents is not guaranteed. Obsolete elements are not defined in this specification, but are listed in the change section of the reference manual.

4.2 SGML

HTML 4.0 is an application of SGML that complies with the international standard ISO 8879 - Standard Generalized Markup Language SGML (defined in [ISO8879] ).

The examples in the text correspond to strict definitions of the document type , if the example does not refer to the elements or attributes defined by the transitional definition of the document type or the definition of the type of document with frames . For brevity, most of the examples in this specification do not begin with a declaration of the type of document required to start any document in HTML format.

The DTD fragments in the element definitions are derived from strict definitions of the document type , except for the elements related to the frames.

For detailed information on the use of strict, transient DTDs or DTDs with frames, see the information about the HTML version .

Comments in HTML 4.0 DTDs are not normative; They are used only for information.

User agents should not generate SGML processing instructions (for example, <? Full volume>) or comments. More information about this and other SGML features that are valid in HTML, but not supported by user agents in general, refer to the limited-support section of SGML.

4.3 Content type text / html

HTML documents are sent via the Internet as a sequence of bytes, followed by encoding information (described in the character encoding section). The transmission structure, called the message entity, is defined by [RFC2045] ) and [RFC2068] . The message entity with the content type "text / html" represents the document in HTML format.

The content type for HTML documents is defined as follows:

Content type name :
Text
Subtype name of content :
Html
Required parameters :
no
Optional parameters :
Charset
Encoding :
All encodings are allowed
Security :
See security notes

The optional parameter "charset" denotes the character encoding used to represent the HTML document as a byte sequence. The valid values ​​for this parameter are defined in the character encoding section. Although this parameter is optional, it is recommended to always specify it.