

By using ‘’ as a kind of parentheses, HTML can indicate the beginning and end of a tag, i.e. HTML borrows a technique from another language, SGML, to provide an easy way for a computer to determine which parts are “MarkUp” and which parts are the content. When you ‘mark up’ a document, you generally don’t want those extra notes that are not really part of the text to be presented to the reader. Tags are not the elements themselves, rather they’re the bits of text you use to tell the computer where an element begins and ends. Most elements can contain other elements, as the body element would contain header elements, paragraph elements, in fact pretty much all of the visible elements of the DOM. a paragraph is an element, or a header is an element, even the body is an element. If the element contains other content, it ends with a closing tag.įor example is starting tag of a paragraph and is closing tag of the same paragraph but This is paragraph is a paragraph element. Source: wikipedia > HTML_elementĪn HTML element is defined by a starting tag. The elements are only generated after the parsing step, from these tags. HTML documents contain tags, but do not contain the elements. “Elements” and “tags” are terms that are widely confused.


SourceĪn attribute is used to define the characteristics of an HTML element and is placed inside the element’s opening tag. The HTML element is everything from the start tag to the end tag. An HTML element usually consists of a start tag and end tag, with the content inserted in between: Content goes here.
