A basic HTML page
An HTML page adheres to defined standards which you need to meet or otherwise the page will not display correctly. The point of having these standards is that you know the page will look more or less the same in whatever browser you use. If you don’t follow the rules you can’t be sure it will look the same on different browsers.
A basic web page consists of:
– declaration
– head
– body
So we start with a simple web page as follows:
<!doctype html>
<html>
<head>
<title>A web page</title>
</head>
<body>
The body text goes here
</body>
</html>
The type Declaration tag
The <!DOCTYPE> declaration is not an HTML tag; it is an instruction to the web browser about what version of HTML the page is written in.
It always appears at the top of the page.
The Head tag
Within the <head> .. </head> tags we place elements which don’t normally display anything on the web page. This includes the title tag, styles for the document, JavaScriptcode, meta tags, and others.
The Body tag
The body tag is where the main body of the document is placed and this is where we put your text, graphics and all the web page structure. The body is placed after </head> and finishes before the </html>.
Some HTML tags
HTML is actually XML which is a tagged mark-up language where the tags infer meaning. All tags have a start and an end and here are some examples:
<title>……..</title>
<p>………</p>
<div>…….</div>
<td>……….</td>