What Is HTML? A Beginner's Guide to the Building Blocks of the Web
HTML is what every web page is made of. Here's what it actually is, how its tags and elements work, and how to write your very first page — explained simply, from zero.
The skeleton of every web page — elements, structure, and semantics.
HTML is what every web page is made of. Here's what it actually is, how its tags and elements work, and how to write your very first page — explained simply, from zero.
Every HTML page sits on the same skeleton: doctype, html, head, and body. Here's what each part does and why it's there — so you can set up any page properly from scratch.
Most of a web page is text. Here are the HTML elements that structure it — headings, paragraphs, lists, line breaks, and the tags that add emphasis — with clear examples of when to use each.
Links are what make the web a web, and images bring pages to life. Learn how to use the <a> and <img> elements properly — including paths, alt text, and opening links in a new tab.
Forms are how websites take input — logins, searches, sign-ups, contact messages. Learn the form, input, label, and button elements, the common input types, and why labels matter so much.
Tables organize data into rows and columns — price lists, schedules, comparisons. Learn the table, tr, th, and td elements, how to build a clean table, and the one mistake to avoid with tables.
Semantic HTML uses elements that describe what content IS — header, nav, main, article, footer — instead of generic divs. Learn why it matters for accessibility and SEO, and how to structure a page properly.
Attributes add information and behavior to HTML elements. Learn how they work, the essential global attributes like id and class, and how id and class form the bridge between HTML, CSS, and JavaScript.
Every HTML element is either block-level or inline, and that single fact explains why some elements stack while others sit side by side. Learn the difference, the key elements in each group, and how to nest them correctly.
A deep dive into the class and id attributes — how to write them, the naming rules, the difference between the two, how CSS and JavaScript use them to target elements, and the conventions that keep large pages maintainable.
A complete guide to HTML lists — unordered, ordered, and description lists. Learn the right markup, the attributes that control numbering, how to nest lists, and where each type genuinely belongs.
Some characters can't be typed straight into HTML, and others won't survive the journey to the browser. Learn what HTML entities are, why they exist, and how to use them for symbols, accents, spaces, and reserved characters.
The <head> holds everything that isn't shown on the page but tells the browser, search engines, and social networks how to treat it. Learn what goes in the head and how meta tags control charset, the viewport, your description, and social previews.
Go beyond the basic <img> tag. Learn responsive images with srcset and <picture>, modern formats like WebP and AVIF, lazy loading, preventing layout shift, and using <figure> for captions.
Learn how to embed sound and video in HTML with the <audio> and <video> elements: multiple source formats, controls, autoplay rules, captions, posters, and the accessibility and performance gotchas that trip people up.
An iframe lets you drop another web page right inside your own — a map, a video, a payment form. Learn how the iframe element works, its key attributes, the security settings that matter, and when to use one (and when not to).
Go beyond the basics of HTML forms. Learn the name attribute, built-in validation with required, pattern, and min/max, grouping with fieldset and legend, datalist suggestions, and how to build forms that are both robust and accessible.
The type attribute turns a plain text box into an email field, a date picker, a color wheel, a slider, and more. Learn every practical HTML input type, what each one gives you for free, and when to reach for it.
Layout is how you arrange the big regions of a page — header, navigation, main content, sidebar, and footer. Learn the standard semantic layout, common page patterns, and where HTML's job ends and CSS's begins.
A practical guide to writing clean, accessible, maintainable HTML. Semantic structure, proper nesting, accessibility, validation, and the small habits that separate sloppy markup from professional code.