Contents:
HTML Document Structure
HTML Tag Syntax
HTML (Hypertext Markup Language) is the language used to encode World Wide Web documents. It is a document-layout and hyperlink-specification language that defines the syntax and placement of special, embedded directions that aren't displayed by a Web browser, but tell it how to display the contents of the document, including text, images, and other supported media. The language also tells you how to make a document interactive through special hypertext links, which connect your document with other documents on your local system, the World Wide Web, and other Internet resources such as FTP and Gopher.
The basic syntax and semantics of HTML are defined in the HTML standard. The HTML standard and all other Web-related standards issues are developed under the authority of the World Wide Web Consortium (W3C). Standards specifications and drafts of new proposals can be found at http://www.w3.org.
The most recent work by the HTML working group at the W3C is a working draft for HTML 3.2. Still, the most definitive implementations of HTML for a Web author come from the tag sets that the most popular browsers use.
This section of the book summarizes the current state of HTML in seven chapters, as listed below. For more information on HTML, we recommend HTML: The Definitive Guide by Chuck Musciano and Bill Kennedy, published by O'Reilly & Associates, Inc.
An HTML document consists of text, which comprises the content of the document, and tags, which define the structure and appearance of the document. The structure of an HTML document is simple, consisting of an outer <html> tag enclosing the document header and body:
<html> <head> <title>Barebones HTML Document</title> </head> <body> This illustrates in a very <i>simple</i> way, the basic structure of an HTML document. </body> </html>
Each document has a head and a body, delimited by the <head> and <body> tags. The head is where you give your HTML document a title and where you indicate other parameters the browser may use when displaying the document. The body is where you put the actual contents of the HTML document. This includes the text for display and document control markers (tags) that advise the browser how to display the text. Tags also reference special-effects files like graphics and sound, and indicate the hot spots (hyperlinks or anchors) that link your document to other documents.