An HTML document can be as freely formatted as you wish. The ends of words and sentences are indicated by spaces. It doesn’t matter how many spaces you use; one is as good as 100! The end of lines counts as one space. Lines can be left broken in odd places and your local Web viewer will join them together into one flowing paragraph.
Elements:
An HTML element generally consist of a start tag and end tag, with the content inserted in between the starting tag and end tag:
Syntex:
<tag name> text here </tag name>
for example:
<p> paragraph text.</p>
Nested Elements:
HTML elements can be nested (elements can contain elements).
All HTML documents consist of nested HTML element.
HTML tags:
<HTML> is a starting tag to delimit the text,add a closing tag by adding a “/” to the starting tag.most but not all tag have a closing tag. It is necessary to write the code for an html page between <html> and </html>
HEAD tags:
The HEAD of an HTML document is where information (which might be ignored by some Web browsers), such as the document’s title, can be placed. There are several elements that can be referenced in the HEAD of a document but we will concentrate on the document’s title. (The document’s title appears as the viewing window’s title on browsers such as Internet Explorer and Netscape.)
The HTML document is isolated into HEAD tag the information about the document is kept within <head> tag.
<head>Should appear after the definition</head>
TITLE Tags:
A typical entry in the HEAD of a document would be:
- <title>
- Title of the document
- </title>
See later for an example HTML document.
BODY tags:
All the content display on the webpage has to be written within the body tag.For example:
<body> all text of webpage </body>
H1 tag:
This is a large heading in all categories.
P tag:
This a paregraph tag write using p tag for example
<p> paragraph text </p>
BR tag:
<br> tag is unpaired tags, if it has not a closing tag. BR tag is used to break the current line.
The BODY of an HTML document is where all the information you wish to view must appear. The text must be carefully marked-up, paragraphs must begin with the <p> marker and the end of each paragraph must be clearly marked using the HTML tag </p>.
Web browsers are, generally speaking, very robust. That is, they will always show some presentation of the text – albeit the wrong or unintended layout. If the body text doesn’t contain paragraph breaks then the text will be viewed as one long paragraph! (See what the ASCII text file.
An HTML document can be as freely formatted as you wish. The ends of words and sentences are indicated by spaces. It doesn’t matter how many spaces you use; one is as good as 100! The end of lines counts as one space. Lines can be left broken in odd places and your local Web viewer will join them together into one flowing paragraph.
HTML tags should always be nested and never over-lapping. Most HTML tags are like brackets – they form pairs; and the various pairs must always match. For example, the brackets: [(< and >)] match; whereas the grouping: [(< and )]> form a miss-match!
HTML is not a formal mark-up language and it has very few rules. It doesn’t insist that text entities, such has headings, have to specified using (heading) format tags. Some people actually write documents without marking-up a heading by using a heading style whilst others produce whole documents using a header style for the body text! Both are bad working practices.
Design and use a common style for all your HTML documents – they will then look as if they have been written by the same author!
Get into the habit of writing good HTML documents using standard tags. HTML is still developing and recent releases offer a wider varied of text layout formats, for example HTML version 2.0 didn’t allow for the centring of text (but HTML versions 3.0 and above does). Remember HTML is only part of the story – its the browsers that uses the mark-up tags to display the text and these might get less forgiving if sloppy HTML mark-ups are used as browser technologies develop.