What is Html element
An HTML element usually has a start tag and an end tag, and it is important in HTML, within which content is included:
Everything from HTML element start tag to end tag is:
Always a HTML element is defined by a start tag. And the end of the closing tag is seven. And you must always know it. And the content which is the content between the start tag and the closing tag is called the HTML Element content. As some examples have shown you below -
<tagname>Content goes here...</tagname>
<p>My first paragraph.</p>
Start tag Element content End tag <h1> My First Heading webstudy </h1> <p> My first paragraph webstudy. </p> <br>
|Start tag||Element content||End tag|
|<h1>||My First Heading webstudy.||</h1>|
|<p>||My first paragraph webstudy.||</p>|
What is nested HTML element?
Let me tell you about the nested element. Elements can be nested inside HTML
Named HTML elements are always included in all HTML documents. I will try to help you with some examples.
There are four HTML elements in this example:
<!DOCTYPE html> <html> <body> <h1>My first post </h1> <p>My first post in webstudy site.</p> </body> </html>
- The <Html> element defines our entire HTML document.
- It has a start tag <html> and an end tag </ html> as it has been told to you.
- The <body> element always defines the document body; whatever we see in web pages inside the browser, it is all built inside the <body> element.
- It has a start tag <body> and an end tag </ body>. As the mind has told you. This is very important in HTML.
- <H1> defines the heading element.
- It also has a start tag <h1> and an end tag </ h1>.
- Contains element content in it: My first heading
- <P> element defines the paragraph in the HTML document.
- It also has a start tag <p> and an end tag </ p>.
- Contains element content in it: My first paragraph.
Empty HTML element.
The HTML elements that do not have content in it are called empty elements.
<br> There is an empty element without a closed tag (the tag defines a line break).
You should always remember these things.