In HTML, elements are the building blocks of a web page. An HTML element is everything from the start tag to the end tag, including the content in between.
<tagname>Content</tagname>
<h1>Welcome</h1>
Creates a heading
<p>Hello World</p>
Displays text as a paragraph
<img src="logo.png" />
Displays an image
HTML elements can be nested inside other elements. The outer element is called the parent, and the inner one is called the child.
<div> <p>This is a paragraph inside a div.</p> </div>
Some HTML elements donβt have closing tags. These are called empty elements.
Help others discover Technorank Learning by sharing your honest experience.
Your support inspires us to keep building!