The basic structure to any HTML document should have these tags in common. Doctype Your HTML document should begin with the <!DOCTYPE> element. The <!DOCTYPE> tag will include the HTML version and refers to a document type definition. The DTD does just what it's name implies it defines the documents types such as elements and attributes, it also describes which relationships are applicable. You cannot assume that just because a document renders in a browser that the code is syntactically correct, some browsers will interpret your code even if it is not correct while others display the incorrect code in an unattractive manner. This is where validation software comes into play, they will read the DTD and check your code against it. Here are three DTD's from www.w3c.org: Strict <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> Transitional <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> Frameset <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN"> You may not wish to use the strict if you will use tags such as the <FONT> tag, which are being depreciated in favor of CSS (Cascading Style Sheets). HTML This is a simple element. The opening tag tells the browser that this is the beginning of an HTML document. With the exception of the <!DOCTYPE>, this tag should be the first to appear within your document. The closing HTML tag tells the browser that this is the end of and HTML document. This should be the last tag to appear in your document. The content model for the HTML tag only allows the <HEAD> and <BODY> tags. Head The Header tag is used to set apart supplementary information for the document from its content. Information that can be placed inside this tag is the title of your page, Meta information, JavaScript, Cascading style sheets, and other items. Both the header's opening and closing tags must come before the Body tag. TitleBody The body tags should be placed inside of the html tags, right after the closing head tag. The body tag is where all your content will be placed, such as text, images, links and other media. The body tag will also include all of the HTML elements that will layout and format your content. There are many attributes for the body tag that control the appearance of your page and they will be discussed in the following section. © Copyright 2000-2002 by Pepmint.com. All Rights Reserved |
||||||||||
home :: tutorial :: portfolio :: links :: hammies :: guestbook :: contact |