HTML Tutorial – Elements

HTML Elements

An HTML element is usually everything from the opening tag to the closing tag. It is defined by a content wrapped within a opening and a close tag.

HTML Element Syntax


<opening tag>Content goes here</closing tag>

HTML Element Syntax Examples


<h1>Hello World!</h1>

HTML Element Syntax Examples Explained

  • The <h1> and </h1> are HTML tags that define a heading element in HTML document
  • Hello World! is the HTML content
  • <h1>Hello World!</h1> as a whole is a HTML heading element.

Let’s take a look at another example:


<p>My first paragraph element</p>

  • The <p> and </p> are HTML tags that define a paragraph element in HTML document
  • My first paragraph element is the HTML content
  • <p>My first paragraph element</p> as a whole is a HTML paragraph element.

Empty HTML Elements

HTML elements with no content are called empty elements. <br> is a perfect example of empty HTML element.


<p>This is a <br> paragraph with a line break.</p>

HTML is Not Case Sensitive

Even though HTML is not case sensitive, but do always use lowercase tags because the World Wide Web Consortium (W3C) recommends lowercase in HTML, and demands lowercase tags in XHTML.