|
HTML is short for Hyper Text Markup Language. HTML is the basis for web pages.
An HTML file can be created using simple text editor like Notepad or Wordpad because an HTML file is a text file.
This text file contains items called markup tags and markup tags tell a web browser ( Firefox, Internet Explorer etc.) how to display a page.
An HTML file must have the extension .htm or .html.
An HTML file is made up of elements and these elements are defined using HTML tags. HTML tags
are surrounded by two angle brackets like these - < and > and generally come in pairs.
For example if you want bold text you would write the following code:
The first <strong> is the start tag, the </strong> is the end tag and the text in between is the element content.
HTML tags are not sensitive so <strong> bold </strong> will produce the same result as <strong> bold </STRONG>
For a basic web page the structure is as follows:
| This HTML Code |
Produces This |
<html>
<head>
<title> Website Title </title>
</head>
<body>
Welcome to a basic web page.
</body>
</html> |
Welcome to a basic web page
|
Let's look at the above web page code in detail.
The first tag <html> which tells your browser that this is the start of an HTML document.
The last tag </html> tells your browser that this is the end of the HTML document.
The text between the <head> tag and the </head> tag is header information which is not displayed in the browser window.
The text between the <title> tags is the title of your document. The title is displayed in your browser's caption bar at the very top of the browser. On this page
you will see "HTML Basics" which is the text that we have in the within the title tag for this page.
This tag is closed off with the </title> tag.
The text between the <body> tags is the text that will be displayed in your browser and is closed by the </body> tag.
If you were creating a web page as we have in the example above you would save the text as
an .htm or .html file extension. For example we could save our file and call it firstpage.html. If you open your browser and from the menu
select the open file option and open firstpage.html you will see a web page that says:
Welcome to a basic web page.
|