Programming日本語で読む

HTML Basics: Page Structure and Meaningful Tags

From headings, paragraphs, and links to page structure, image alt text, and form labels. Learn to build HTML as meaningful structure, with short examples and a common mistake.

Contents
  1. 1. A page has a basic skeleton
  2. 2. Order headings and content
  3. 3. Add information with attributes
  4. A common mistake, and the fix
  5. Where this site uses it
  6. Read next

When I look at a diagram or a practice page, I sometimes wonder what role each heading and button plays. HTML is the language that gives a page meaning, such as "this is a heading" or "this is the main text," before any styling happens.

This page goes one step past a list of tags. It shows how to group content and how to write HTML that also works for screen readers and keyboard users.

1. A page has a basic skeleton

head holds the page settings, and body holds what appears on screen. Inside the body, tags such as header, main, and footer mark out the big areas.

HTML
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>A Small Study Notebook</title>
  </head>
  <body>
    <header><a href="/">Study Notes</a></header>
    <main>
      <article>
        <h1>Today's topic</h1>
        <p>A short explanation goes here.</p>
      </article>
    </main>
    <footer>Updated 2026</footer>
  </body>
</html>

main is the central content of the page, and article is a self-contained piece such as a post or a card. div is a box with no meaning of its own; use it when no tag fits the role.

2. Order headings and content

Headings are not just for making text bigger. Like placing subheadings under a main heading, they show how the content is organized. A list groups items, and a link points somewhere else.

HTML
<article>
  <h2>Get your tools ready</h2>
  <p>First, clear your desk.</p>
  <ul>
    <li>Notebook</li>
    <li>Pen</li>
  </ul>
  <a href="/practice">Go to practice</a>
</article>

You could make the same look with CSS, but if you replace headings with bold text, people and screen readers trying to follow the page structure lose that meaning.

3. Add information with attributes

Extra information written inside a tag is called an attribute. A link's href is its destination, and an image's alt is the text that stands in for the image. In forms, connecting a label to its input makes it clear what the field is for.

HTML
<label for="topic">Topic you want to study</label>
<input id="topic" name="topic" type="text">
<button type="button">Choose topic</button>

When the for value matches the input's id, clicking the label moves focus to the input. name identifies the value when the form is sent.

A common mistake, and the fix

Putting some text above an input can look like a label. But HTML does not know the text and the input belong together.

Common mistake
<div>Email address</div>
<input type="email">
Fixed
<label for="email">Email address</label>
<input id="email" name="email" type="email">

With matching for and id, the clickable area gets bigger, and assistive technology can announce the field's name.

Where this site uses it

The JLPT N3 grammar map groups its overview, cards, quiz, and word list into clear sections. HTML is what sets that order and those roles.

Read next

CSS basics adds looks and layout to the boxes HTML creates. For interaction, see JavaScript basics.

You do not need to memorize every tag name. Decide what each part of your content does, then pick the tag that fits.

⚠️ These notes were written for my own study. They do not guarantee accuracy or that you will pass an exam. Please don’t rely on them alone — check official sources and other materials yourself.

XLINE

← Back to home