HTML - Elements
An HTML Element can be defined by a start tag. supposing the element contains additional or some other content, it has to end with a close tag, in which the element name is followed by a forward slash as it is shown in the table below:
|Start Tag||Content||End Tag|
|<br />||Break or a void element|
So in this table <p>....</p> is a particular element in HTML, <h1>...</h1> is a diffrent element in Element. There are a few elements in HTML that do not need a close tag, such as elements are: <img.../>, <hr /> and <br /> elements in HTML. These are reffered to as empty elements.
Documents in HTML are made up of a tree of these various elements and they describe and specify how HTML pages or documents should be structured and built. Also, it specifies the kind of content that should be placed in a certain section of an HTML document.
HTML Tag & Element
An element in HTML is enumerated by a start tag. If the particular element has some other content preceding it then it has to end with a close tag.
Looking at an example, <p> is the start tag of a paragraph and also </p> is close tag of the same paragraph but <p>This is paragraph</p> is a paragraph element in HTML.
Nested HTML Elements
It is very much okay to place one element in HTML inside another HTML element, look at the example below:
<!DOCTYPE html> <html> <head> <title>Nested Elements Example</title> </head> <body> <h1>This is <i>italic</i> heading</h1> <p>This is <u>underlined</u> paragraph</p> </body> </html>
Nested HTML elements are regarded as the children of the parent element containing them. This pushes the concept of inheritance in which the parent container element can offer its qualities to its children elements in other to avoid them getting assigned those special qualities directly.
Although Some HTML elements do not allow nesting other elements in them unless they are the inline elements. For example, we can't nest a paragraph inside another paragraph like we can nest a division inside of another a division. Same thing here, we cannot nest a list element item inside another list element item.