HTML - Elements।। ( part- 3)

HTML - Elements

HTML - Elements, HTML Tutorial
HTML - Elements
An HTML element is defined by an initial tag. If the element contains other content, then it ends with a closing tag, where the element name comes before the next slash, as shown below with some tags -


Start TagContentEnd 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>






















Previous Post
Next Post

post written by:

0 Comments: