Categories : Latest Posts | News | Web Design |
Tags : HTML | HTML Tags | HyperText Markup Language | Web Design
A web page or HyperText Markup Language (HTML) page is a script used to format the appearance of content in a web browser.
HTML uses what are known as HTML Tags to do this.
Each HTML tag has <> around it.
Each HTML tag consists of an opening tag and closing tag. The Closing tag has a / so the browser knows it’s a closing HTML tag.
Example of an HTML tag
<p>This is some text</p>
As you can see from the above example we have the content (This is some text) and this has been put in a <p></p> HTML tag.
There many HTML tags available to use and each has a different function. Most modern web design packages are created with the designer in mind and you can create web pages without the need to understand HTML code. It is however useful to understand HTML as quite often a HTML page may not look right in a certain web browser and by understanding how HTML work you can quite often fix these display problems.
All web pages follow a set base structure (as seen below).
<HTML>
<HEAD></HEAD>
<BODY></BODY>
</HTML>
Let’s look at this for a moment to see what’s going on. For a web browser to know its dealing with an HTML document it’s not enough to call the file .html but the first line of the file should contain the <HTML> tag.
The <HTML> tag tells the web browser that the file is a web page.
Next comes <HEAD> and </HEAD>, anything put in this tag tells the web browser about the web page itself. For instance it could detail the title of the page, its author or even a description of the page.
Next comes <BODY> </BODY>, this tag is where the actual visible content for the page is stored, it can be text, images or other items, but for content to be seen on screen it must appear in the body tag.
There are some ‘scripts’ which can be added to the head section to give the web page functionality but this is not the same as actual content.
Finally there is a closing </HTML> tag to let the web browser know the file is finished.
Although if you do not get the HTML quite right in a web page, the page may still display, you may find results inconsistent at best. This is due to most modern web browser attempts to work with ‘broken code’.
This article was written by Mark Excell of Websites by Mark