Master Code
On The Go

Learn. Practice. Build.

Home › Code Snippets › HTML Snippets › Reference

HTML Reference

HTML Element Reference

Every HTML element explained with syntax, attributes, examples, and accessibility notes.

Last updated: October 2026

What this is: A complete, alphabetical reference of every HTML element. Each page covers the syntax, every attribute, live examples, common mistakes, and accessibility notes. Bookmark this page — you'll return to it often.

📚 All HTML Reference Pages

🔗

<a> — Anchor

The hyperlink element. href, target, rel, download, and every attribute.

Read Reference →
📦

<div> — Container

The generic block container. When to use it, when not to, and how it compares to semantic elements.

Read Reference →
📝

<span> — Inline Container

The inline equivalent of div. Style a word or phrase without breaking the line.

Read Reference →
📄

<p> — Paragraph

The element that carries the written web. Body text, articles, and descriptions.

Read Reference →
🖼️

<img> — Images

Embed images with src, alt, srcset, and lazy loading.

Read Reference →
📄

<h1>–<h6> — Headings

The six levels that define content hierarchy. Critical for SEO and a11y.

Read Reference →
📋

<form> — Forms

The container for interactive controls. GET vs POST, file uploads, accessibility.

Read Reference →
🔘

<button> — Button

The accessible element for any clickable action. Types, states, and patterns.

Read Reference →
📋

<ul> & <ol> — Lists

Unordered, ordered, and description lists. Nesting, styling, and accessibility.

Read Reference →
⌨️

<input> — Input

Every input type: text, email, number, date, file, checkbox, radio.

Read Reference →
📊

<table> — Table

Tabular data with thead, tbody, tfoot, colspan, and rowspan.

Read Reference →
🧩

<section> & <article> — Semantic

Self-contained content vs thematic groups. The right way to replace div soup.

Read Reference →
🎬

<video> & <audio> — Media

Native media playback. Controls, autoplay, poster, captions, and multiple sources.

Read Reference →
⚙️

<meta> — Metadata

Charset, viewport, description, Open Graph, and Twitter cards. Every tag for SEO and social.

Read Reference →
🔗

<link> — External Resources

Stylesheets, favicons, canonical, preload, preconnect, and every rel value.

Read Reference →
🎯

<aside> & <nav> — Sidebar & Navigation

Complementary content and navigation landmarks. The right way to structure site navigation.

Read Reference →
📖

How to Use This Reference

Each element page follows the same structure:

  • Definition — what the element does in one sentence.
  • Live example — the element in action with real output.
  • Attributes table — every attribute with values and purpose.
  • Code examples — copy-paste ready patterns for common use cases.
  • Common mistakes — the errors that cost developers time.
  • Accessibility notes — how to make the element work for everyone.
  • FAQ — the questions people ask most.

❓ Frequently Asked Questions

What is the HTML reference?

The HTML reference is a complete, alphabetical guide to every HTML element. Each page explains the element's purpose, every attribute, code examples, common mistakes, and accessibility notes.

Which HTML elements are covered first?

We start with the most-used elements: <a>, <div>, <span>, <p>, <img>, <h1>–<h6>, <form>, <input>, <button>, and more. Pages are added in order of search volume and developer need.

Do the examples work without JavaScript?

Yes. Every example uses modern HTML5 features that work in all browsers without JavaScript libraries. Where JavaScript is needed (like <dialog>), it's minimal and included inline.

Is this reference good for beginners?

Yes. Each page starts with a plain-English definition and a live example, then goes deeper into attributes and advanced usage. Beginners can skim; professionals can dive.

← All HTML Snippets