HTML Elements

HTML documents are composed entirely of HTML elements that, in their most general form have three components:

1. A pair of tags,
2. A “start tag” and
3. “end tag”;
some attributes within the start tag; and finally, any textual and graphical content between the start and end tags, perhaps including other nested elements. The HTML element is everything between and including the start and end tags. Each tag is enclosed in angle brackets.
The general form of an HTML element is therefore:

Some HTML elements are defined as empty elements and take the form

Empty elements may enclose no content, for instance, the BR tag or the inline IMG tag. The name of an HTML element is the name used in the tags. Note that the end tag’s name is preceded by a slash character, “/”, and that in empty elements the end tag is neither required nor allowed. If attributes are not mentioned, default values are used in each case.
Element examples:

1.Header of the HTML document:

Usually the title should be included in the head,
For example:

2. Headings:

HTML headings are defined with the <h1> to <h6> tags:

Try it

3. Paragraphs:

Try it

4. Line breaks: <br />

The difference between <br /> and <p> is that ‘br’ breaks a line without altering the semantic structure of the page, whereas ‘p’ sections the page into paragraphs. Note also that ‘br’ is an empty element in that, while it may have attributes, it can take no content and it may not have an end tag.



Comments can help in the understanding of the markup and do not display in the webpage


 21 total views,  3 views today