A HTML file is basically a bit of text like any word-processor out put. So there is no need to be intimidate by it. If you can write a paragraph in a word processor then you can learn to write HTML.
If you open a HTML file as a text file in your word processor, (or use the 'view source' option on your browser) you will see lots of bits surrounded by the Less than "<" and greater than ">" symbols. These are called tags and they are the bits that tell the browser what to do with the file.
If you go through the page and remove the < > along with all the bites bracketed by them you will be left with the text you read when you open the file in a browser. Fundamentally these tags are the punctuation and syntax of HTML. Just as you use a full stop to tell the reader that that is the end of a sentence, HTML used <BR> to mark the end of a line.
Ok So just what tags will you see
All HTML files follow the same basic structure.
- This is saying "I am an html file- treat every thing after this tag as html"
- This is the title of this page. It will appear in the top of the browser and in the history section and when you bookmark the page. As a result when you are writing you own pages a good short and to the point title is very important.
- The end of the title.
- The end of the head section. Other things can appear in the head section but there is no need to worry about them here.
- This is the main bit that appears in the window when you view the file. There are lots of things that can be included in the body section to set back ground colours, images and the colours of the text and the links. But we will look at that later.
The important thing to know is that anything between the body tags will be shown in the window.
- Marks the end of the body section
- Marks the end of the file. Anything after this will be ignored by the browser.
Brief interrupt.. Spotted something here?
May tags are paired in that they have a 'turn on'<X> and a 'turn off' tag </X>
Any way back to the plot...The worlds shortest HTML file is..
<TITLE>My page </TITLE>
Don't believe me?
Copy this into a text file. Save it as "test.htm"and view it through your browser.
Would I lie to you?
Lets look at more interesting Tags shall we.