Html Element

Html Element

In today’s Blog we will learn about Html element, Please read this blog till end so you don’t miss any important points.

Html element is define by starting tag and then content and end with closing tag. Html element is everything from start tag to end tag.

Syntax

<tagname> Some Content </tagname>

Here <tagname> can be anything like <h1> <p> <html> etc. and we define content inside this tag.

Some Examples are as below

<h1> CreatesWowtech </h1>
<p> Learn it , Share it </p>

Here <h1> and <p> are starting tags , </h1> and </p> are closing tags, and Crateswowtech and Learn it and Share it are content , so this complete example is elements.

Nested Html Elements

Html elements can be defined as nested as well , even all html documents are nested

For detail please check below example

<html>    
    <body>
        <h1>Hello World</h1>        
    </body>
</html>

Here you can see 3 html elements <html> , <body> and <h1>

Here <html> is root element, It defines whole html documents

It start with <html> tag and close with <html> tag.

inside <html> there is <body> element.

body defines the body of document. it start with <body> tag and end with </body> tag

Inside <body> element there is <h1> tag which defines heading and it start with <h1> tag and end with </h1> tag.

Same like <h1> there are many html elements which are used to create complete html documents

We will learn all html elements and attributes in next topics so please stay connected with us.

Subscribe to our newsletter

Leave a Reply
Your email address will not be published. *