HTML Elements

Samuel Barton

Return to Home page/portfolio
<!DOCTYPE html>
The required first line that declares the document is an HTML5 page.
<html>
Root element of an HTML page
<head>
Container for metadata
<body>
Main content of the document
<title>
Defines the page’s title (appears in the browser tab)
<meta>
Provides metadata like charset, viewport, and description
<link>
Connects external resources (like CSS files)
<script>
Embeds or references JavaScript
<style>
Embeds internal CSS styles
<header>
Introductory or navigational content
<footer>
Footer information for a page or section
<nav>
Contains navigation links
<main>
Represents the main content area
<section>
Defines a thematic grouping of content
<article>
Represents self-contained, reusable content (like a blog post)
<aside>
Contains tangentially related content (like a sidebar)
<div>
Generic block-level container for grouping elements
<h1>
Top-level heading
<h2>
Second-level heading
<h3>
>Third-level heading
<p>
Paragraph of text
<span>
Generic inline container for text or inline elements
<a>
Creates a hyperlink
<ul>
Unordered (bulleted) list
<li>
List item
<img>
Embeds an image
<figure>
Groups media with a caption or label
<figcaption>
Caption for a
element
<video>
Embeds video content
<audio>
Embeds sound content
<source>
Specifies media source for