Learning HTML

HTML is the main language for building webpages so, if you want to build your own webpages, you might want to learn how to use HTML. HTML is not the only way to build webpages, however, and many sites exist which will enable webpages to be built in other ways, and there is plenty of software available which will also help build your own website. I cannot possibly cover all the possibilities, but this is one way which works and which you may find satisfaction in learning and using.
HTML stands for HyperText Markup Language. This is a computer language for describing how documents (webpages) are presented. In order to do this the document content appears within the HTML between HTML tags. The HTML tags explain how the content is to be shown on the webpage.
HTML has been through a number of different versions since it was first introduced with changes and enhancements introduced often in an ad hoc way by different browsers, such as IE and Netscape. This makes the language difficult to learn in a definitive way, especially when browsers have always tended to be very lenient when interpreting HTML, so that even badly structured and syntactically incorrect code can be resolved by guesswork.
The flavour of HTML that I intend to use in this series of articles is intended to generally be compatible with HTML4 and XHTML and forward compatible. I believe that this is the best approach, because it will encourage good habits and lay a good basis for developing skills further.
HTML tags appear between angle brackets like this . It is a strict rule in XHTML that all tags must be terminated, so that tags often appear in pairs like this with other tags and content between them. The / symbol in the second tag indicates that it is a closing tag. Some tags can close themselves, for example the line break tag:
Here is the basic structure of an HTML document:
My First Webpage

 

This is where all the main content goes.
The indenting is not important, but is included for presentation purposes and helps to clarify the tag opening/closing structure. Case is important. Tags must be in lowercase. Again, most browsers will be tolerant of this, but if you do not follow this rule this may cause trouble for you and your webpages sometime in the future. Generally, spaces (except single spaces between words) are ignored in HTML. If you do need additional spaces then will insert a single space.
HTML should be created by a Text Editor, such as Notepad. Never use a Word Processor such as Word to create an HTML document. If you want to find out why not, just try it. There are a number of free text editors available as well as editors created specifically for HTML. HTML editors are very good, but they will tend to impose their own flavour of HTML and also offer a rather confusing range of extra facilities so, if you are just beginning I advise that you avoid them for now until you are more familiar with the language and can make your own decisions about what editor you wish to use.
To start, just create a folder somewhere for your HTML documents and, using your text editor, type in the lines above exactly as they appear. Save the file as firstpage.html.
If you open up the folder in Windows Explorer, you should see the file you have just created. If you double click on it, the file should open up in your browser (probably IE) and give you a blank screen except for the words ‘This is where all the main content goes.’ The title will not appear in the main body but should appear in the title bar of the browser, up the top of the screen. That’s really not very exciting, but hopefully it should show that HTML is not difficult.

You might also like More from author

Leave A Reply

Your email address will not be published.