Tutorials

HTML Tutorial

All Tutorials Learning Tools Login

HTML Tutorial · Chapter 3 of 9

HTML Elements

Tags, attributes, and nesting.

An element usually looks like <tag>content</tag>.

Attributes add extra information, such as href on links or alt on images.

Elements sample Try it Yourself »
<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>HTML Elements</title>
</head>
<body>
    <h1 id="title">Student Page</h1>
    <p class="note">Nested tags must be closed in order.</p>
</body>
</html>

Classroom Tips

  • Close tags properly.
  • Prefer meaningful tag names over only using div.