How HTML works

HTML is a markup language, not a programming language. It wraps the text on a page in tags that tell the browser what is what: this is the main heading, this is a paragraph, this is a link, this is an image. The browser reads the HTML and displays the page accordingly. CSS then takes care of the look and JavaScript of the interactivity.

If you use WordPress, you usually do not write HTML by hand. The editor, theme or page builder generates it. Even so, the quality of the resulting HTML matters.

Why it matters

HTML is also read by search engines and by screen readers for blind users. When a page has one main heading, logical subheadings, image descriptions and real links instead of clickable text, Google understands better what it is about, and the site is more accessible for everyone.

  • SEO: headings, the title and image descriptions help Google understand the content.
  • Speed: bloated HTML from page builders slows loading down.
  • Accessibility: screen readers find their way around using the HTML structure.

A real-world example

A company selling tools had category headings on its website made only of enlarged bold text. To visitors it looked like a heading, but to Google it was an ordinary paragraph. Once the theme was changed so that these became real HTML headings, the category pages gradually started ranking for more precise search terms.

Common mistakes

  • Several main headings on one page, or none at all.
  • Images without alternative text.
  • Headings chosen by font size rather than by meaning.
  • Text inserted as an image, which neither Google nor a screen reader can read.

When building a website, I write clean, readable HTML, even if the client never sees it. HTML is also used in emails, for example in an email signature that has to display correctly in every email program.