EduMaster LMS

Profile Sarah K.

Web Development Fundamentals

Your Progress

Complete lessons to unlock your certificate

60%

Course Content

5 Chapters • 23 Lessons

1

HTML Basics

2

CSS Fundamentals

3

JavaScript Essentials

4

Responsive Design

5

Final Project

Lesson 3

HTML Elements and Tags

25 min Intermediate Last updated: June 15, 2023

Understanding HTML Elements

HTML elements are the building blocks of any webpage. They consist of tags that define the structure and content of your document.

<!DOCTYPE html>
<html>
<head>
    <title>My Page</title>
</head>
<body>
    <h1>This is a Heading</h1>
    <p>This is a paragraph.</p>
</body>
</html>

Common HTML Elements

  • <h1> to <h6>: Heading elements
  • <p>: Paragraph element
  • <a>: Anchor element for links
  • <img>: Image element
  • <div>: Division or section element
  • <span>: Inline container element
Pro Tip

Always close your HTML tags properly to avoid rendering issues. Some tags like <img> are self-closing.

Nesting Elements

HTML elements can be nested inside other elements to create more complex structures.

<div class="container">
    <h1>Welcome</h1>
    <p>This is a <span class="highlight">highlighted</span> text.</p>
    <a href="#"><img src="image.jpg" alt="Example"></a>
</div>

Lesson Resources

Download these files to follow along with the lesson

starter-code.zip

HTML • 12 KB

html-cheatsheet.pdf

PDF • 1.2 MB

Additional References

External Links

Made with DeepSite LogoDeepSite - 🧬 Remix