HTML tags, nearly all of them, come in pairs, for example, to indicate a paragraph we use the 'p' tag i.e < p > and < /p >. Any text within < p > and < /p > is defined as a paragraph. Here < p > is the start tag and < /p > is the end tag.
Every HTML document starts with the 'html' start tag < html > and end with the html end tag < /html >. A html document consists of 2 main divisions, the head denoted by the head tag(< head > and < /head >) and body denoted by the body tag (< body > and < /body >).
The head tag contains all the information like the styles used, description for the web page, links to any external style sheet or scripts(internal and external) which we will come to later in the series.
The body tag is where all the "visible" data goes. If anything is to be displayed on the web page it MUST be written within the body tag i.e < body > and < /body >.
A basic example of a HTML document is given below:
< html >
< head >
< /head >
< body >
< h1 > this is my first heading < /h1 >
< p > this is my first paragraph. You can create any number of headings and paragraphs as you want.. < /p >
< /body >
< /html >
You can see the browser output of this code in the image below. Click on it to see it in full size.

Next i will be talking about HTML elements. So till then, See ya.
No comments:
Post a Comment