|
Understanding HTML Tags and How They Work You
may be asking yourself why you need to know this if you are going
to use a WYSIWYG html editor? Well...two reasons...
REMEMBER
that MOST HTML tags MUST have an 'opening' AND a 'closing' tag.
HERE
ARE THE MOST COMMON HTML TAGS <HTML> This 'opens' an HTML document = it tells the browser what kind of document (HTML) is going to be displayed. <HEAD> This comes next after < HTML> and contains the <TITLE></TITLE>, and the 'metatags' of the document. This includes a Description, and Keywords that help the search engines to find the document on the www. Metatags are ONE EXCEPTION to the 'close' tag rule; they do not require a closing tag, only an opening tag. Metatags contain the information WITHIN the Opening tag, and are closed by using the 'less than' symbol. (See Fig.1, below). </HEAD> Closes the Head section of the document. <BODY> This tag will contain the basic attributes of the page, what its background color or image is, what colors the text, links, active links and visited links will be. (It sometimes also contains 'special' instructions to your browser, for instance if certain images need to be loaded 'first' to run an element of the page.) Sometimes a 'default' FONT is set for the entire document immediately after the end of the 'open' body tag, and looks like this: <FONT FACE="Arial, Helvetica, sans serif" SIZE="2">But remember!!! If you use this tag, you must remember to CLOSE it in the SAME POSITION at the bottom of the page...It comes AFTER the OPEN Body, so the CLOSE font tag must come immediately BEFORE the CLOSE body tag at the bottom of the document. Like this: </FONT> </BODY> Everything that is between the opening <body> tag and the closing </body> tag is what you will see in the html document when you open it in your browser. After the 'close body' tag, then we have the 'close html' tag </html>...which ends the html document. NOTE: It doesn't matter at all whether you use all caps or all lower case, except in how 'pretty' your code is...most web designers will pick one or the other for uniformity's sake. Here
is a simple set of HTML tags, which (with very little variation)
you will find in EVERY html document: ![]() Fig. 1 Other
than the basic concepts described above, one thing to pay special attention
to is the placement of any 'quotation marks' within the tags. An OPEN
body tag may contain 'attributes' that are described between the "<"
and ">". You
may also see an attribute expressed WITHOUT quotation marks around the
'value' half of the equation like this: ATTRIBUTE
= VALUE In most cases, it can be expressed EITHER WAY, but Internet Explorer is much more 'forgiving' of this kind of sloppiness than Netscape. To be on the SAFE side, do one or the other CONSISTENTLY. Never have some values within a tag enclosed by quotation marks, and other values NOT enclosed. This is asking for error messages from your browser.
|