HTML Elements are the tag as a entire, so this take in the opening tag, the text within and then the closing tag as well. The only role of elements where it can start to become tricky is when you have elements appearing within elements, however, if you practice this section a lot you will then acquire it's not tricky if you know where to put the element codes.
<!DOCTYPE html>
<html>
<head>
<title>HTML Elements</title>
</head>
<body>
<h2>Heading Tag</h2>
<p>Paragraph Tag</p>
<p style="color: blue;">The style is attribute of paragraph tag</p>
<span>The element contains tag, attribute and content</span>
</body>
</html>
Void Elements : In HTML all elements does not require the start and eng tag are called the void elements in html. Some of Void Elements in HTML
are <br>
(represent the line break) and <hr>
(represent the horizontal line). These html elements are also called unpaired tag and empty tags.
Nested HTML Elements: HTML can be nested, which means an element can contain in another element.
in HTML, all the elements are divided into two parts based on their default display and styling purpose are given below.
Some of the block-level elements examples in HTML are given below.
<address>
<article>
<aside>
<blockquote>
<canvas>
<dd>
<div>
<dl>
<dt>
<fieldset>
<figcaption>
<figure>
<footer>
<form>
<h1>
to <h6>
<header>
<li>
<main>
<output>
<p>
<section>
<!DOCTYPE html>
<html>
<head>
<title>Block Level Elements</title>
</head>
<body>
<div style="background-color: tomato;">This is div tag. This is block level element.</div>
<div style="background-color: pink;">This is another div tag. This is block level element.</div>
<p style="background-color: green;color:white;">This is also a block level element</p>
</body>
</html>
<a>
<abbr>
<acronym>
<b>
<bdo>
<big>
<br>
<button>
<cite>
<code>
<dfn>
<em>
<i>
<img>
<input>
<kbd>
<label>
<map>
<object>
<q>
<samp>
<script>
<select>
<small>
<span>
<strong>
<sub>
<sup>
<textarea>
<time>
<tt>
<var>
<!DOCTYPE html>
<html>
<head>
<title>Inline Level Elements Example</title>
</head>
<body>
<a href="default.html">Click on link and Inline Elements</a>
<span style="background-color:tomato;">this is inline element</span>
<p>This p tag is block level element and contain the <span style="background-color:lightblue;">inline element</span> inside.</p>
</body>
</html>