| HTML Guide: Recommended Usage | cern archive | HTTP only |
| home archive home about | |||||||||||||
Recommended HTML UsageThis part of the HTML Reference shows recommended usage. These constructs are recommended because
Structure of an HTML documentAn HTML document should start with a TITLE element.If the document is searchable, an ISINDEX element should come next. After any TITLE and ISINDEX elements comes the BODY, which should start with an H1 element, followed by other elements character data. See also: tolerated structural errors, severe structural errors. Header ElementsTITLEThe TITLE element should identify the document in a fairly wide context. Its content should fit on one line: it should be less than 72 characters with no linebreaks. It should not contain any '<' characters.The title may be used to identify the node in a history list, to label the window displaying the node, etc. It is not normally displayed in the text of a document itself. Contrast titles with headings . ISINDEXThe presence of the ISINDEX element indicates the document is searchable.
Body ElementsWithin the content of these elements, the characters '<', '>', and '&' signal markup in many cases. They should be written as "<", ">", and "&" respectively, to prevent this.AnchorsA span of text can be marked as an anchor. Anchors can be used as the source of a hypertext link:Choose this to view a neighbor document. ... or as the destination: See also: tolerated errors in anchors, severe errors in anchors. HeadingsHeadings are used to break the body into sections and subsections. Several levels of headings are defined:
Level four headings are for sub-sub-sub headingsParagraphsText that isn't marked up as some other element forms a paragraph.Normal paragraphs consist of text consisting of words, sentences, and other stuff. Line breaks have no significance except to separate words. This is still the first paragraph of this section. This is the second paragraph. Paragraphs are separated by P elements. HTML is relatively flat, and paragraph breaks are not allowed inside lists, headers, anchors, etc.
Lists
Glossaries
AddressThe address element indicates the author or source of the document:DWC connolly@convex.com TYPEWRITERThe TYPEWRITER element is used for characters that have already been formatted for a typewriter-like device. Markup is recognized in this element just as in the normal body paragraphs. But after processing tags and entity references, the data is displayed as on a typewriter, rather than using typesetting conventions.Line breaks are significant, and characters are rendered in a fixed-width font to preserve horizontal formatting. For example, a portion of a man page might look like:
Literal Text ElementsXMP and LISTINGThese elements are used when you want to type the characters into the source document and have them show up in the output just like you typed them.These elements act much like the TYPEWRITER element, but because markup is not recognized in their content, some character sequences can't be represented (SGML end tags, for example.) On the other hand, you don't have to meticulously mark up all the special characters. |
|
||||||||||||