HTML Tutorial



HTML Elements


πŸ”Ή HTML Elements

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.

πŸ” Basic Structure of an Element: <tagname>Content</tagname>

πŸ“˜ Examples of HTML Elements

Heading Element

<h1>Welcome</h1>

Creates a heading

Paragraph Element

<p>Hello World</p>

Displays text as a paragraph

Image Element

<img src="logo.png" />

Displays an image

πŸ”„ Nested HTML Elements

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>
  

⚠️ Empty Elements

Some HTML elements don’t have closing tags. These are called empty elements.

  • <br> – Line break
  • <hr> – Horizontal line
  • <img> – Image tag
βœ… Reminder Always properly close HTML elements (except empty ones). Nest elements correctly for valid structure!

🌟 Enjoyed Learning with Us?

Help others discover Technorank Learning by sharing your honest experience.
Your support inspires us to keep building!

Leave a Google Review