HTML Elements

What is Html Element ?

The HTML Element are the elements with Starting tag , containing some content and after content a closing tag . The Html Elements are required to write the html page . As-

<tagname> Some Contents.</tagname>

Some more Examples of HTML tags :

<h1> This is Digitechbits heading </h1>

<p> This is paragraph Tag </p>

The structure for this

Start tagElement contentEnd tag
<h1>This is Digitech bits heading</h1>
<p>This is paragraph Tag.</p>
<br>nonenone

Some HTML elements have no content they called Empty elements . Empty Element do not have an end tag ! Like <br>

Nested HTML Elements

What are Nested HTML Element ?

Those HTML elements which can be nested , means that elements which can contain other elements , called Nested HTML Element . It means Nested HTML element allow to keep one HTML element inside another HTML elements .

Examples for nested html element that contains HTML elements as (<html><body><h1> ,<p>) :-

<html>

   <head>
      <title> Nested Elements Example </title>
   </head>
	
   <body>
      <h1> This is <i> italic </i> Digitechbits </h1>
      <p> This will be a <u> underlined </u> paragraph </p>
   </body>
	
</html>

Example Explanation :

The above example is for nested html element , in which The <html> element is the root element and it defines that this is HTML document . In Nested or simple Html Element there is always a Start tag <html> and an end tag </html>. Then , inside the <html> element there is all other element like <body> <head> and all . As :-

<body>

<h1> This  is Digitech bits heading  </h1>
<p> This is paragraph Tag </p>

</body>

The <body> element in html document , defines the document’s body. It consists a start tag <body> and an end tag </body>. After that , inside the <body> element there is four other elements: <h1>, <i>, <p> <u> :

<h1> This is <i> italic </i> Digitechbits </h1>

<p> This will be a <u> underlined </u> paragraph </p>

The <h1> element is a heading tag . It start with <h1> and ends with </h1> . Where , </h1> is closing tag . As :

<h1> This is Digitechbits </h1>

The <p> element is for paragraph. It start with <p> and ends with </p> . Where , </p> is closing tag . As :

<p> This is paragraph Tag </p>

The <i> element is for Italic Font. It start with <i> and ends with </i> . Where , </i> is closing tag . As :

<i> italic </i>

html elements web development

The <u> element is to Underline the text . It start with <u> and ends with </u> . Where , </u> is closing tag . As :

<u> underlined </u>

MORE About HTML Elements

If you forget the end tag of Some HTML elements they will display correctly , but never write the elements without the end tag because it may cause Unexpected results and errors .

Also HTML is not case sensitive , so you can write code in any fonts . But Digitech bits recommends you to use  lowercase in HTML . At Digitechbits.com we always use lowercase tag names.

What are empty elements in HTML elements ?

HTML elements with no content or empty content are called empty elements . For example <br> is a empty element in HTML elements because it is line break tag .

HTML Tag Reference by Digitech bits

TagDescription
<html>Html Defines the root of the HTML document
<body> Body Defines the document’s body
<h1> to <h6> h1, h2 … h6 tags Defines HTML headings
<b> Defines bold text
<title> Defines a title for the document
HTML Tag Reference

One Reply to “HTML Elements”

Leave a Reply

Your email address will not be published.