HTML cheat sheet: the 30 tags you need, with live examples

Most HTML cheat sheets stop at tag names. Ours groups 30 tags with the one rule to remember for each, and our free page file shows the code for every tag next to its live result.

In short

A useful HTML cheat sheet covers about 30 tags in five groups: page structure, text, links and images, lists and tables, and forms. That is enough to build a first one-page site.

Each entry should show four things: the tag, one line on what it is for, the code, and what that code looks like in a browser. Most lists stop at the first two.

Make it one HTML file with a filter box and jump links, put it at a share link, and you can still fix the text later without sending a new link.

We made a one-page HTML cheat sheet for a fictional beginner group, Riverside Coding Club. It has 30 cards, a filter box and five jump links. We pasted it into NOS, shared it, and opened the link on a phone-sized screen. Then we changed the handout line from Week 1 to Week 2 on the NOS screen and reopened the same link. Every picture below comes from that run.

What should an HTML cheat sheet include?

The tags a beginner types in the first week, and nothing else. We picked 30 by asking one question per tag: does a first one-page site need it? Here is the list, by group.

GroupTagsThe one thing to remember
Page structure (8)html, head, title, meta, body, header, main, footerOnly what sits inside body shows on the page.
Text (8)h1 to h6, p, strong, em, br, span, blockquote, codeOne h1 per page. Then h2, h3 in order, never picked for size.
Links and images (4)a, img, figure, svgEvery img needs alt text, plus width and height.
Lists and tables (5)ul with li, ol, table, details, divUse a table for rows of data, not for page layout.
Forms (5)form, label, input, button, selectA form needs somewhere to send answers. A plain page has none.

The last column is what most cheat sheets leave out. A tag name is easy to look up. The rule that stops a mistake is the part people forget.

What are the basic HTML tags?

Every page starts with the same skeleton. If you learn only one block by heart, make it this one:

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width,initial-scale=1">
  <title>My page</title>
</head>
<body>
  <h1>Hello</h1>
  <p>My first paragraph.</p>
</body>
</html>

The viewport line is the one beginners skip. Without it, phones draw the page at desktop width and shrink it, so the text gets tiny.

How many HTML tags are there?

MDN's element reference lists 111 current elements, plus a separate list of obsolete ones that you should not use (MDN, checked Nov 27, 2026). You will not need most of them for a while. Tags like base, slot and template matter later, once you build bigger sites. The 30 above cover a first page.

How do I make my own HTML cheat sheet page?

Build one file, then put it at a link. Here is the order we used.

1. Write one card per tag. Each card holds the tag name, a one-line use, the code in a dark box, and a Result box that runs the same code. In the code box, write &lt; instead of <. Otherwise the browser treats your sample as real markup and shows the result where the code should be.

2. Paste the file into NOS. Open Code view and paste the whole file. The live page shows under the code, so you can spot a broken card right away.

NOS Code view with the cheat sheet HTML on top and the rendered page with the Fictional example banner below
1. In Code view the pasted file sits on top and the page it makes sits underneath.

3. Check it in View mode. This is what people with the link will see. Make sure the tag count next to the filter box matches your title.

NOS View mode showing the cheat sheet title, filter box reading 30 tags, five section chips and the first html card
2. In View mode the counter reads 30 tags, the same number as the title.

That counter caught a real mistake. Our first draft had 31 cards under a title that promised 30. The page counts its own cards, so the number on screen gave it away. We cut one card before uploading.

4. Make a share link. Click Share. The panel says anyone with the link can read the page without signing in, and can't edit it. The panel also notes that search indexing is off for this link.

NOS Share this page panel with the Share link tab, Anyone with the link setting, an unticked Public on the web box and the link with a copy button
3. Copy the link from the Share panel and send it to the group.

5. Open the link on a phone. The cards stack into one column on a narrow screen. A reader sees the same page you checked in View mode.

The shared cheat sheet on a phone-sized screen showing the Week 1 handout line and the first card
4. The shared link on a phone-sized screen, before any change.

6. Try the jump links. Tapping Forms on the shared page scrolls straight to the form cards. The Result boxes are live, so the text box and checkbox work.

The shared cheat sheet scrolled to the Forms section showing form, label and input cards with a working name box and checkbox
5. After tapping Forms. The label and input cards show real fields.

How do I find a tag fast on a long cheat sheet?

Add a filter box. Ours checks the tag name and a few plain words saved on each card, such as "link" for the a tag or "dropdown" for select. Typing "table" on the shared link left one card and hid the empty sections.

The shared cheat sheet with table typed in the filter box, the counter reading 1 tag and only the table card with its rendered Week and Topic grid
6. The filter on the shared link. One match, and its Result box shows the table.

Pick those extra words with care. A beginner searching "dropdown" will not know the tag is called select. The words a reader would type matter more than the tag names.

Can I update a cheat sheet after I share it?

Yes, and the link stays the same. In NOS, click Edit, then click the text you want to change. We clicked the handout line, replaced it with the Week 2 text, and clicked Done.

NOS Edit mode with the bar reading Editing, click any text to change it, a Done button, and the handout line now reading Week 2
7. The new Week 2 line, typed straight onto the page in Edit mode.

Then we opened the old link again. It showed the Week 2 line. The filter box still worked after the edit, which is how we took picture 6.

The same shared link after the edit, now showing the Week 2 handout line
8. The same link after the edit. Nobody needs a new address.

Edit mode is for words. To add a new card or change how the filter works, change the file in Code view instead.

Is there a printable HTML cheat sheet PDF?

You can make one from your own page. Our file has print rules that hide the filter box, the jump links and the Result boxes, and set the cards in three columns. To get a PDF, open the page in Chrome, choose Print, and pick Save as PDF as the destination (Chrome Help). We did not print a copy for this test. Look at Print preview before you hand it out, and check that no card splits across two pages.

When not to do this

  • You need every tag and every attribute. Use MDN's reference. A one-page sheet is for the tags you type often, not for looking up rare ones.
  • You want readers to save notes or ticks on the page. A shared page shows the same thing to everyone, and our filter forgets what you typed when you reload.
  • The sheet is only ever printed. A doc or slide may be quicker. The link, the filter and the live Result boxes are the reasons to build it in HTML.
  • Your class already uses a course site. Put the sheet there so students have one place to look.

Where NOS fits

NOS Workspace keeps an HTML page at a link that people open without an account. You paste or upload the file, share the link, and change text later in Edit mode. The Free plan allows 3 share links at once and 2 MB per document, and our cheat sheet file is about 15 KB. See current plans.

Want to start from ours? Download the 30-tag cheat sheet file and change the cards to fit your class. For sharing tips, read how to share an HTML file. For two of the cards in more depth, see code and pre and tr, td and th.

Questions people ask

What is the best HTML cheat sheet for beginners?

One that covers the 30 or so tags a first page needs and shows what each one looks like in a browser. Tag names alone are easy to find. The live result and a one-line rule for each tag are what help you avoid mistakes.

Can I download an HTML cheat sheet as a PDF?

Open an HTML cheat sheet page in Chrome, choose Print, and set the destination to Save as PDF. Check Print preview first so cards do not split across pages.

Which HTML tags should I learn first?

Start with the page skeleton: html, head, meta, title and body. Then add h1, p, a, img, ul and li. With those you can build a simple page with headings, links, pictures and lists.

Can I share an HTML cheat sheet with my class without a website?

No website is needed. Put the single HTML file at a share link, for example with NOS Workspace, and send the link. Students open it in a browser without signing in, and you can fix the text later at the same address.

Keep reading