HTML Elements are consist of an opening tag then some content comes and then a closing tag that is the whole structure of HTML elements.
What are HTML Elements And How They Works
HTML elements are basically defined by a string tag. This string tag starts with an opening tag and some pieces of content and then closes with an end tag.
Demo Of HTML Element
<p> This is a Paragraph </p>
<p> is called an opening tag and “This is a Paragraph” is a piece of content and at last
</p> is called an ending tag and collectively all this is called HTML Element.
|Opening Tag||Contnet||Closing Tag|
|<h1>||This is Heading||</h1>|
|<p>||This is Paragraph||</p>|
What are Nested HTML Elements?
By nested HTML elements, we mean elements that can contain other elements inside of them.
Below HTML elements example contains four elements such as
HTML Elements Explained
The working of the above HTML elements are as follows
<html>element is the root of every web page. Every web page starts with it and all the other HTML elements are coming under it.
<html> element there is
<body>element. All the visible content that you see on your screen comes inside this element.
Then comes the two other important elements such as
The first element is used to declare headings in the HTML document and the other is used to define paragraphs.
<head> <title>WalkIntoPC Online Code Editor</title> </head>
<h1> This is Heading Element</h1>
<p> This is Paragraph Element</p>
HTML Break Element
HTML break element defines with
<br>tag. It is responsible for a line break and moves the character to the next line.
It has no end tag like other HTML elements.
<p> This is <br>Paragraph With Break Element </p>