Articles by HTML5 Doctor

Font Pairing Guide: Which Fonts Go Together in CSS?

My test line was “Fix it on Saturday”. At the same size, three bold faces needed roughly 473, 512 and 611 pixels to set those words. That difference is why I start a font pairing guide with the page’s actual text. For this repair cafe notice, Georgia above Arial is my starting pair. You can […]

How to Debug and Validate HTML: A Practical Workflow

Here is how to debug and validate HTML: reproduce the fault, inspect the source, fix the first useful validation error and try the page again. Do not stop at a passing report. The markup may be valid while a link still takes someone to the wrong place. Debugging means finding why that happened. Work through […]

How to Comment in HTML: Syntax, Examples and Common Mistakes

To comment in HTML, write your note between <!– and –>. A comment can fit on one line or span several lines. Its text is not displayed as ordinary page content, but anyone who receives the HTML can inspect it. Keep passwords, private notes and other secrets out of comments. You can use comments to […]

How to Code Lyrics in HTML: Verses, Line Breaks and CSS

To code lyrics in HTML, put each verse or chorus in its own paragraph and use <br> where a lyric line must end. Add headings when readers need to jump between song sections. Use CSS for spacing, type size and wrapping. A static lyrics page needs no JavaScript. The difficult part is usually preserving the […]

How to Center Text in HTML: CSS Examples and Fixes

To center text in HTML, apply the CSS declaration text-align: center; to the block containing the text. For example, <p style=”text-align: center;”>Hello</p> centers that paragraph’s text horizontally. Use CSS for new work; the old center element is obsolete. The common source of confusion is what you want to move. Centering the words inside a box, […]

What Is HTML? A Beginner’s Guide with a Working Example

HTML stands for HyperText Markup Language. It gives a web page its structure and meaning. Which words are a heading? Where does a paragraph start? What does a link point to? HTML marks out those parts so a browser can put the page together. Wondering “what is HTML?” because you want to make a website? […]

How to Add SEO Keywords in HTML: A Practical Guide

To add SEO keywords in HTML, give the page a descriptive title, explain its subject in the main heading and opening paragraph, and use relevant wording in the rest of the content. Add an accurate meta description, link text, and image alternatives. Leave out the meta keywords tag: Google ignores it. Let’s say you're creating […]

HTML5 Video Not Properly Encoded: Causes and Fixes

When you receive the notice “HTML5 video not properly encoded”, your player is unable to use the video provided. The reason could be an unsupported codec or a corrupted file; however, a single notification does not confirm faulty encoding. First, verify that the video URL and server response are correct, and that the requested file […]