Websites and banners, made understandableImages · Code · WordPress
Home / HTML & design
THE WEB ARTICLE INDEX

HTML & design

Make pages easier to read with image wrapping, line length, contrast and a legible favicon. Open a guide for a code example and a check you can run in your browser.

Reserve space for three card covers

Check the cards on a narrow screen before and after the images load.

  1. Give each cover wrapper aspect-ratio: 4 / 3 and the full card width.
  2. For mixed source proportions, set image width and height to 100% and use object-fit: cover. Check the crop.
  3. At two widths, compare wrapper heights and heading positions before and after loading.

Example: a 320 px wide wrapper at 4:3 is 240 px tall. The heading below it keeps its position after the image loads if the wrapper height and other layout conditions stay fixed.

Width 320 px → Ratio 4:3 → Height 240 px
The cover has reserved space before the image loads.

W3C · CSS Box Sizing

Keep a table readable on a narrow screen

Find the number of boxes in batch B in both examples below. In the first table the long identifier wraps inside its cell. Read the row header B and the column header above the count. The answer is 12 boxes. You can still select and copy the whole identifier.

In the second example the table is wider than a narrow screen. Focus the labelled region and press Right Arrow, or swipe across the table on a phone. The last cell should come into view while the surrounding text stays in place.

Increase the text size in the example and repeat the lookup. In your own table, keep the caption, give column headers scope=col and row headers scope=row. Write down the row, column and value you found. If you end up with a number and no identifiable header, check the markup before publishing.

Two headers identify one cell. The value 12 counts boxes in batch B. Both versions keep their row and column headers in the table.
The value 12 counts boxes in batch B. Both versions keep their row and column headers in the table. © web-article.com.ua, CC BY 4.0.

W3C WAI on tables with two headers

Wrapping identifiers
BatchDelivery identifierBoxes
AWAREHOUSEA0000000318
BWAREHOUSEB00000004712
Scrollable table
BatchDelivery identifierBoxes
AWAREHOUSEA0000000318
BWAREHOUSEB00000004712

Check Cyrillic wrapping when a local font falls back

Start with letters your readers actually use. The samples below have the same text, size, padding and width. The first loads a local Golos Text Cyrillic font; the second uses the system serif. Both allow the line to wrap and the container to grow.

Narrow the window and record the final word on the first line of each specimen. Examine Ё, Ґ, Є, І and Ї. Can you see the dots and the top of each character? Can you select the text? Record width, last word and line count. Equal block heights can hide quite different glyph widths.

When the font file is unavailable, the first specimen uses its fallback. Compare it with the lower specimen and reload after restoring access. The file is served from this site; the download and licence sit beside the examples.

Two faces, one line of text. Compare Ё, Ґ, Є, І and Ї in both samples. A line break may move even when the two blocks have the same height.
Compare Ё, Ґ, Є, І and Ї in both samples. A line break may move even when the two blocks have the same height. © web-article.com.ua, CC BY 4.0.

Golos Text project and licence

Local font

Ёж · Ґрунт · Єдність · Іній · Їжак

System fallback

Ёж · Ґрунт · Єдність · Іній · Їжак

Golos Text (WOFF2) · Licence (OFL)