HTML COURSE โ€ข LESSON 4

HTML Elements

HTML elements are the building blocks used to create web pages.

What is an HTML Element?

Most HTML elements have a start tag, content and an end tag.

<p>
This is a paragraph.
</p>
HTML Element Structure

<start tag> + content + <end tag>

Example

HTML Element
<h1>Welcome to EDUHUB</h1>

In this example:

Nested HTML Elements

HTML elements can be placed inside other HTML elements. This is called nesting.

Nested Elements
<html>

<body>

    <h1>EDUHUB Code Hub</h1>

    <p>Learn web development online.</p>

</body>

</html>

Empty HTML Elements

Some HTML elements do not contain content and do not need a closing tag.

Empty Elements
<br>

<hr>

<img src="image.jpg" alt="Example">
โญ Remember

HTML tags are not case-sensitive, but modern web developers normally write all HTML tags in lowercase.

โšก EDUHUB Live HTML Editor

LIVE PREVIEW