Elements in HTML

All the elements in HTML5 are identified by tags in the text source. Usually a tag consists of the element name within angle brackets (< >) . By default the browser knows about any text within brackets is hidden and not displayed in the browser window.All the element name displayed in the opening tag which is also called a start tag and again in the closing which is also called an end tag preceded by a slash (/).

An example of elements

Start tag content End tag
<p> A paragraph </p>
<h2> A heading </h2>


Demo

elements demo

Nested Elements example

<!DOCTYPE html>
  <html>
    <head>
      <title> </title> 
    </head>
    <body>
                        
    </body>
  </html>

Explanation of nested elements

As in this example there is html element and inside the html element there is head and body element, this sequence is called nested elements (elements between other elements).

Note

The ending tag works something like an “off” switch for the element. Be careful not to use the similar backslash character in end tags.








The Best

Comment here

If you have any query, if you want to know something about any of technical course related to computer science field, if you have any suggestion about relevant to uploaded content or if you anything wrong here (any mistake in content) than please contact us. Keep in mind, comment should be according to community guidelines.