AjapaReporter

Home life · Updated

How to Write a Header: HTML & Word Steps

Time it takes5 min
Steps6in the list below
LevelEasyno special skills
Official sourceW3C HTML Specificationcheck it for changes

Quick answer A header is the text at the top of a page, section, or document that introduces the content. In HTML, use <h1> to <h6> tags; in Word, use the built-in Header styles.

What You’ll Need

  • A text editor (like Notepad, VS Code) or a word processor (like Microsoft Word or Google Docs)
  • Basic understanding of your document’s structure (what the main title is, what sections you have)

Step-by-Step

  1. Decide the hierarchy. Determine the main title (level 1) and any subheadings (level 2, 3, etc.). Only use one <h1> per page.
  2. Write the header text. Keep it short, descriptive, and relevant. Use title case (capitalize major words) for a professional look.
  3. In HTML, use the correct tag. For the main title, use <h1>Your Main Title</h1>. For sections, use <h2>, then <h3> for sub-sections, and so on. Do not skip levels (e.g., go from h1 to h3).
  4. In Word or Google Docs, use styles. Highlight the text, then go to the Home tab (or Format menu) and choose Heading 1, Heading 2, etc. This ensures consistent formatting and allows automatic table of contents.
  5. Add a header to a printed document (optional). In Word, go to Insert > Header and choose a style. Type your header text (e.g., page number, document title). This appears on every page.
  6. Check the appearance. Preview your page or document to ensure headers look correct and are not too large or too small. Adjust font size or spacing if needed.

Common Mistakes

  • Using multiple <h1> tags on one page – this confuses search engines and screen readers.
  • Skipping heading levels (e.g., using h3 after h1). This breaks the logical structure.
  • Using headers for styling only (e.g., making text bold and large) instead of using actual header tags. This hurts accessibility and SEO.
  • Putting too much text in a header – headers should be concise, not paragraphs.
  • In Word, manually formatting headers instead of using styles – this makes it hard to update the table of contents later.

Tips

  • Use keywords in your headers to help with search engine optimization (SEO) – but keep them natural.
  • Keep headers consistent in style and tone throughout your document.
  • In HTML, you can style headers with CSS (e.g., h1 { color: blue; }) to make them stand out.
  • In Word, you can modify the Heading styles by right-clicking the style and choosing “Modify” to change font, size, and color.
  • For long documents, use headers to create a table of contents automatically – this saves time and improves navigation.

Troubleshooting

If your headers don’t look right, check the following:

  • In HTML: Make sure you closed the tag correctly (e.g., </h1>). Open the page in a browser to see if the header displays.
  • In Word: If the header doesn’t appear on every page, check that you haven’t unchecked “Different First Page” or “Link to Previous” in the header/footer settings.
  • If the header is too big or small: Adjust the font size in the style settings, not by manually selecting text each time.
  • If the table of contents isn’t picking up your headers: Ensure you used the built-in Heading styles, not just bold text.

Frequently Asked Questions

Can I use more than one H1 tag on a page?

Technically yes, but it’s not recommended. Use one H1 for the main title, and use H2 for section headings. This helps search engines understand your page structure.

What is the difference between a header and a heading?

A heading is the title of a section (like “Introduction”). A header can also refer to the top area of a page (like a page header with the document title). In HTML, “header” can be a <header> element that contains headings and other introductory content.

How do I make a header in HTML that stays at the top of the page?

Use CSS to fix the position: header { position: fixed; top: 0; width: 100%; }. But be careful to add padding to the body so content isn’t hidden behind it.

What is the best font size for a header?

It depends on your design. Typically, H1 is larger than H2, and so on. A common default is H1 at 2em, H2 at 1.5em, H3 at 1.17em. But you can adjust to fit your content.

Should headers be bold?

Most browsers and word processors make headers bold by default, but you can change that with CSS or style settings. Bold helps them stand out, but it’s not required.

Can I use headers in a PDF?

Yes, you can add headers in PDF editors or when exporting from Word. In Word, the headers you add will appear in the PDF export.

Sources: W3C HTML Specification. Menus and buttons can differ slightly by version. Spotted something out of date? Tell us.