introduction to html

HTML Tag Formats.
This introduction to HTML ( hyper text mark-up language ) provides you with an appreciation of the most important tags and their purpose, and a comprehensive alphabetic list of the tags supported by both Netscape's Navigator, Firefox, and Microsoft's Internet Explorer browsers. Some of these tags are a little outdated now but still work. HTML documents are simple text files created by a word processor or text editor. Always remember, when saving an HTML document, it must be saved as a text file or it will not be recognised by your web browser. All HTML tags are enclosed by "less than" (<) and "greater than" (>) signs, also referred to as angled brackets, and mostly consist of start and end pairs such as <PRE> and </PRE>, which indicate the start and end of pre-formatted text. All end tags consist of the start tag preceded by a forward slash sign ( / ), which makes them easy to remember.
HTML tags are not generally case-sensitive and lower, upper and mixed-case formats work equally well. However, it is best to choose one or the other and stick to it at all times. The one exception to the above "case" rule is where file names are invoked from within an HTML tag; in this circumstance you must conform to the casing conventions of the web server.
Tag attributes are always entered between the tag command word and the closing angled bracket; for example:
<table border=1 cellspacing=1 cellpadding=2 bgcolour=pink>
Some tags can also be nested within other tags; for example:
<H1> This is my <B> Home Page </B> heading </H1>.
In the case of tag nesting, the order of tags is vital; whenever you use a closing tag, it should always correspond to the last unclosed opening tag. It should also be noted that HTML browsers ignore any extra spaces inserted within text. This allows the HTML author to insert spaces and returns strategically so that the code can be viewed more easily. However spaces and returns cannot be used to format your web pages; rather you must use specific HTML tags such as <P> ( new paragraph ) or <BR> ( new line ) for page formatting purposes. Some tags, such as the heading tags <H1> to <H6>, include automatic line breaks, which means that you don't need a <P> or <BR> tag following a heading tag.
HTML Document Tags.
Each HTML document should have the following document tags at the start and end of the page in the order shown, although with most browsers this is not a mandatory requirement:
<HTML> Identifies the document as HTML.
<HEAD> Indicates the start of the "heading" section.
<TITLE> The document title goes here.
</TITLE> Indicates the end of the document title.
</HEAD> Indicates the end of the "heading" section.
<BODY> The remainder of your document follows.
Page content goes here.
</BODY> Indicates the end of the main body.
</HTML> Indicates the end of the HTML document.
The <HEAD> tags contain the document title tag <TITLE>, the contents of which appears in the browser's title bar. The content of the <TITLE> tag is also used by many web search engines or crawlers as the web site descriptor and it also appears in a browser's history list and bookmarks, so be sure to always use appropriate text in your document title.
The <BODY> tags contain the page content and the <BODY> tag extensions can also be used to define the colour scheme of your web page. For example the following tag:
<body bgcolour=white text=black link=red alink=blue vlink=purple>
sets the page background colour to white, the default text colour to black, the "unvisited" hyperlinks to red, the "clicked" hyperlinks to blue and the "already visited" hyperlinks to purple.
Although the above tags are not mandatory, it is good practice to use them in all HTML documents; as a minimum you should always include a <TITLE> tag to allow search engines to find appropriate pages on your web site. A title cannot include any formatting tags, images or links to other web pages. As the web becomes more complex with more and more document types being supported, the <HTML> tag will clearly identify your file as an HTML document, and might well become a mandatory requirement in the future.
NB: All other tags in an HTML document must be placed within the <BODY> and </BODY> tags.
To continue this tutorial please visit our sitemap link from the bottom of the page.