HTML - Elements
HTML - Elements |
Start Tag | Content | End Tag |
---|---|---|
<p> | This is paragraph content. | </p> |
<h1> | This is heading content. | </h1> |
<div> | This is division content. | </div> |
<br /> |
So here <p> .... </ p> is an HTML element, <h1> ... </ h1> is another HTML element. There are some HTML elements that do not need to be closed, like <img ... />, <hr /> and <br /> element. These are known as zero elements.
HTML documents contain one of these elements and they specify how HTML documents should be constructed, and in which part of the HTML document should be kept.
Example
Live Demo
<!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>
0 Comments: