HTML Elements

Andrew Montgomery

30 HTML Elements

<html>
Root element that wraps the entire HTML document.
<head>
Contains metadata, links to stylesheets, and scripts.
<body>
Holds all visible content on the webpage.
<title>
Sets the page title shown in the browser tab.
<meta>
Provides metadata like character encoding and viewport settings.
<link>
Connects external resources like CSS files.
<script>
Embeds or links JavaScript for interactivity.
<style>
Adds internal CSS styles directly in the HTML.
<header>
Defines introductory content like logo or navigation.
<nav>
Contains navigation links or menus.
<main>
Represents the main content of the page.
<section>
Groups related content into thematic blocks.
<article>
Encapsulates self-contained content like blog posts.
<aside>
Holds side content like ads or related links.
<footer>
Displays footer info like contact or copyright.
<div>
Generic container for grouping and styling content.
<h1> / <h6>
Headings from most to least important (e.g., <h1> for page title).
<p>
Paragraph of text.
<br>
Inserts a line break.
<hr>
Adds a horizontal rule for separation.
<a>
Creates hyperlinks to other pages or sections.
<strong>
Emphasizes text with bold styling.
<em>
Emphasizes text with italic styling.
<span>
Inline container for styling or scripting.
<mar>
Highlights text.
<code>
Displays inline code snippets.
<small>
Renders smaller text.
<ul>
Unordered list (bullets).
<ol>
Ordered list (numbers).
<li>
List item inside <ul> or <ol>.