Tags and Elements do not match.
Items
These are the parts themselves, i.e. a paragraph is an element, or a heading is an element, even a body is an element. Most elements can contain other elements, since the body element will contain heading elements, paragraph elements, in fact almost all visible DOM elements.
For example:
<p>This is the <span>Home</span> page</p>
Tags
Tags are not elements themselves, rather they are bits of text that you use to tell the computer where the element starts and ends. When you “tag” a document, you usually do not need these additional notes, which are not really part of the text that should be presented to the reader. HTML borrows technology from another SGML language to provide an easy way for a computer to determine which parts are “MarkUp” and which parts are content. Using '<' and '>' in brackets, HTML can indicate the beginning and end of the tag, that is, the presence of '<' tells the browser, "this next bit is markup, note."
The browser sees the letters "
"and decides:" A new paragraph has begun, it is better to start a new line and, possibly, back off. "Then, when he sees"
"he knows that the paragraph he was working on is over, so he must break the line there before moving on to the next.
- Opening a tag.
- End tag

nrvarun Feb 14 '17 at 19:29 2017-02-14 19:29
source share