Skip to content

HTML Common Elements

Headings

<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
  • h1 - defines the most important heading
  • hx - defines a heading where x is the heading level (1-6)

Sections

<section>
    <h1>Section Heading</h1>
    <p>Section Content</p>
</section>

Paragraphs

<p>This is a paragraph.</p>
<a href="https://www.google.com">Google</a>
  • href - defines the link destination (URL)
  • use target="_blank" to open the link in a new tab

Images

<img src="./path" alt="Image 1" />

Divisions (Divs | HTML Containers)

<div>
    <h1>Division Heading</h1>
    <p>Division Content</p>
</div>

Info

Divs are used to group elements together. They are not semantic elements, so they do not convey any meaning to the browser.