![]() |
|
HTML Tutorial #2 Now you know a little about HTML, it might be nice to be able to create a template file that you could use each time you wanted to create a new page. Here's what it looks like:- <HTML> Each line is part of a nested section. The HTML starts as before followed by the HEAD section which contains things like the page TITLE (as shown), META tags (see later tutorials), scripts (they have their own tutorials) and comments. The TITLE is essential as it is displayed in the title caption at the top of the browser window and is used by most Search Engines to locate your page in it's database (this is an enormous subject by itself so I'll be devoting another set of articles exclusively to this topic). The TITLE is then closed off (using the / slash) as is the HEAD section. The BODY is then opened and will contain the main body (unsurprisingly) of your text. More on that in a minute. To complete our template file, we'll add some comments. <HTML> Save this template file as something meaningful (TEMPLATE.HTM would be good) and you can use it as the basis for all future pages. I'll leave you with a few extra tags to experiment with. I won't be displaying the entire template file just the BODY tags for you to cut and paste into a new file each time. Take a look at this. <BODY> Hello World! Note that the B (for BOLD) can be upper or lower case (indeed all HTML tages can be mixed case, the only exception being the text you want displayed) and can be switched off in the usual way with the / slash character. A similar tag is STRONG as in:- <BODY> which does much the same thing. You can also draw a very nice Horizontal line (or Rule) using:- <BODY> Note that this does not need a closing / slash character and it automatically resizes to the browser window. Finally, to make life easier, there are some built-in headline tags as follows:- <BODY> These look something like this on the page:- Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Note how they diminish in size (you only have 6 sizes to choose from). The advantage of using these is that they will be interpreted in much the same way in all browsers (rather than using specific font sizes which I'll cover in a future tutorial). That's it for this tutorial. Try constructing a page using a centred, large font, bold headline, some text seperated by paragraphs with some letters and words in bold (check the previous tutorial if you've forgotten how to do some of this). Also see what effect blank lines in the code have on the printed page (hint: none whatsoever). See you next time... Please eMail me at: nickjc@nickjc.co.uk if you need help |
|