← All topics

16 posts filed under HTML, newest first.

10 min

h4 was the right size

I pulled up the list of headings on a client's page and got the company name and three things at level four, with the actual subject of the page missing from the list entirely because somebody had built it out of a div.

HTML Accessibility
7 min

Printing an accordion

A customer saved a client's returns page as a PDF and got back a column of questions with white space under every one of them, which is what an accordion does when it meets a printer.

HTML Accessibility
7 min

A modal is a form

I deleted a focus trap last October and was extremely pleased with myself, then read the dialog element's documentation properly and found the one method call that had been doing that job, and 4 others, since 2022.

HTML Accessibility
8 min

Scroll wheels and zip codes

A customer was charged for 40 of something they had ordered 4 of, and the mechanism turned out to be a browser behavior sitting inside the one input type everybody reaches for.

Forms HTML
10 min

The popover attribute

Somebody at a client's office emailed to say the order filters sent them back to the beginning every time they used them, and the fix was deleting the 180 lines I had written to do that job badly.

HTML Accessibility
9 min

Outlook renders with Word

A client asked whether the newsletter could look like their new site, which is a completely fair question, and answering it honestly meant explaining that the biggest email client in the working world lays out HTML with a word processor.

HTML Cross-Browser Compatibility
8 min

Four sentences somebody could check

A client asked what progressive enhancement meant in practice and the 4 of us in the room produced about 90 seconds of gesturing, not one word of which anybody could have written down.

JavaScript HTML
9 min

CSS Grid and the wrapper div

CSS Grid landed in Firefox and Chrome in the same week, and the first thing I did with it was break a layout with an empty wrapper div my hands typed on their own.

CSS HTML
6 min

content: "\00a0"

Why the most-used string in my stylesheets is an invisible one, how CSS escapes will silently eat the character after them, and the parts of the content property that aren't strings at all.

HTML CSS
1 min

optgroup

A select with 40 options in it is nearly always a select that wanted three or four labeled groups, and the element for that has been sitting in HTML the entire time.

HTML Forms Small Print
6 min

The 400 KB hero

Every conversation about page weight goes straight to minification. Meanwhile there is a 2 MB image on the page that nobody has opened since Photoshop.

HTML Images Performance
2 min

abbr and the title attribute

The abbreviation element is one of about four places in HTML where the title attribute is the actual content rather than a decoration, and it is still unreachable for anybody not holding a mouse.

HTML Accessibility Small Print
6 min

Everything is a div

Div soup is what you write before you learn what the other hundred elements are for. The argument for fixing it isn't screenreaders or SEO, it's the next person who opens the file.

HTML Cross-Browser Compatibility