HTML Tutorial

The language for building web pages.

HTML Elements

HTML Elements

An HTML element is defined by a start tag, some content, and an end tag.

Syntax:

<tagname> content </tagname>

Common HTML Elements:

TagDescription
<h1> to <h6>HTML headings
<p>HTML paragraph
<br>Line break (empty element)
<hr>Horizontal rule
<a>Hyperlink

Note: Some HTML elements have no content and no closing tag — these are called empty elements. Example: <br>

Try It Yourself

Edit the code below and click Run to see the result live.

Source Code
Result
Topics