Sub topic 12
Using real markup instead of visual tricks
This chapter assumes you have written work documents such as reports, emails, or documentation. It also assumes you have seen basic Markdown or word-processor styles, such as "Heading 1" in a word processor or # in Markdown. You do not need to know HTML.
A document can look structured without being structured. A line of bold text can look like a heading. A column of dashes can look like a list. Tabs and spaces can look like a table. The reader sees the structure, but software does not. This chapter explains the difference and shows how to fix it.
Visual tricks and real markup
A visual trick is formatting that imitates a structure by appearance alone. Real markup is formatting that tells the software what a piece of content is: a heading, a list item, a table cell. The software then decides how to display it.
The difference matters because structure is used by more than the eyes. Tools read it too:
- Navigation panes and tables of contents are built from headings.
- Screen readers announce lists and tables and let users jump between them.
- Search, export, and conversion tools (for example, Word to PDF or Markdown to web page) keep real structure and lose fake structure.
- Style changes apply to every heading or list at once when they are real.
The ideas in earlier chapters, such as heading hierarchy, parallel list items, and table design, only work if the structure is real. A well-planned outline built from bold paragraphs is just a long page of text to any tool.
Common visual tricks and their real replacements
Each trick below is easy to spot in a review. The right column shows what to use instead.
| Visual trick | What goes wrong | Real markup |
|---|---|---|
| Bold paragraph used as a heading | No outline, no table of contents, no heading navigation | Heading style, or `##` in Markdown |
| Heading level chosen for its size | Levels skip or go out of order, so the outline is wrong | Choose the level by position in the outline, then adjust appearance with styles |
| Typed hyphens, asterisks, or bullet characters at the start of lines | Not announced as a list; wrapped lines do not indent | List style, or `- ` in Markdown |
| Typed numbers such as "1." with manual line breaks | Numbers do not update when you insert a step | Numbered list style, or `1.` in Markdown |
| Tabs or repeated spaces to make columns | Columns break when text wraps or the font changes | Table with a header row |
| Blank lines or empty paragraphs for spacing | Screen readers may announce "blank"; spacing changes on export | Paragraph spacing in the style |
| A screenshot of a table | Cannot be searched, copied, or read aloud | A real table, with the image only as a supplement |
| Indenting with spaces to show a sub-point | Nesting is not recorded | Nested list item |
Headings
Use the heading style for every heading, and choose the level by where the heading sits in the outline.
A common mistake is to pick a level because of how it looks. For example, a writer finds that the third-level heading is smaller and more pleasant, so they use it directly under the title. The outline then jumps from level 1 to level 3. A reader using heading navigation hears or sees a gap and wonders whether a section is missing.
If a heading looks too large or too small, change the style definition. Do not change the level.
Here is the same content built both ways, in Markdown:
Visual trick:
**Backup schedule**
Backups run nightly.
**Restore steps**
Use the restore tool.
Real markup:
## Backup schedule
Backups run nightly.
## Restore steps
Use the restore tool.In the first version, a tool that builds an outline finds nothing. In the second, it finds two sections.
Rules for real headings
- Use exactly one level 1 heading, the document title, where the format allows it.
- Do not skip levels going down. A level 2 is followed by a level 3, not a level 4.
- Going back up can skip levels. A level 4 can be followed by a level 2 when a new major section starts.
- Do not use a heading for text that is not a title, such as a pull quote or a warning. Use a callout or a paragraph.
Lists
Real lists have two properties that typed characters lack. The software knows which items belong together, and it handles wrapping, numbering, and nesting for you.
Consider a typed list:
Before you start:
- Confirm that the main branch passes all checks.
- Confirm that the changelog is up to date.In Markdown, the hyphen is not decoration. It is the marker that makes the list. This is real markup. The same hyphen typed in a word processor, with no list style, is a visual trick, because the program treats it as ordinary text.
Numbered lists and renumbering
A numbered list that is typed by hand fails the first time someone inserts a step. You then have to renumber every item below it, and a missed number produces an error such as two steps labeled 4.
In a real numbered list, the software numbers the items. In Markdown, you can even write every number as 1. and the renderer will count for you:
1. Create the release tag.
1. Run the deployment pipeline.
1. Verify the health check page.
1. Announce the release.This renders as steps 1 to 4. Inserting a new step needs no renumbering. Many teams still write 1., 2., 3. in source files so the raw text is readable. Both are valid. Choose one and use it consistently.
Nesting
Show a sub-point by nesting it in the list. In Markdown, indent the nested item under its parent, usually by two to four spaces.
- Prepare the environment
- Install the command-line tool
- Set the API key
- Run the scriptSpaces that only push text to the right, without a list marker, record nothing.
Tables
A real table has rows, columns, and a header row: the first row, which names each column. Assistive technology uses the header row to announce which column a cell belongs to. Tab-aligned text has none of this.
A table made with spaces:
Plan Storage Users
Basic 10 GB 1
Team 100 GB 10The same data as a real Markdown table:
| Plan | Storage | Users |
|:------|--------:|------:|
| Basic | 10 GB | 1 |
| Team | 100 GB | 10 |The separator row (the line of dashes) is required. It tells the renderer that the line above is a header. The colons set alignment: a colon on the left means left-aligned, and a colon on the right means right-aligned.
Two further habits keep tables real:
- Do not use a table for page layout, such as placing an image beside a paragraph. A table says "this data has rows and columns", and readers who use assistive technology will be told that it does.
- Avoid merged or split cells where you can. They make cell-to-header relationships hard for software to determine. If you need them, split the content into two simpler tables.
Emphasis and other small structures
The same rule applies below the level of headings, lists, and tables.
- Use bold or italic markup for emphasis, not capital letters or underscores typed as a line.
- Use code formatting for commands, file names, and values, so they are marked as code and shown in a fixed-width font.
- Use real links with descriptive text. A link that reads "click here" says nothing when a screen reader lists the links on a page.
- Use paragraph breaks, not line breaks, between paragraphs. In Markdown, a blank line separates paragraphs.
Checking whether markup is real
You can test a document without special tools.
- Open the navigation pane or outline view. If your editor has one, the headings should appear as a tree. If it is empty or incomplete, some headings are visual tricks.
- Change the style. Edit the heading style or list style and see whether every instance changes. Items that stay the same were formatted by hand.
- Select a list and look at the toolbar. The list button should show as active. If it does not, the bullets are typed characters.
- Resize the window or change the font. Tab-aligned columns drift apart. Real tables stay intact.
- Copy the content into a plain text editor. Real Markdown shows its markers. Rich text that arrives as one flat block has lost structure.
- Export to another format. Convert the document to PDF or a web page and check whether the outline survives.
Edge cases
- Markdown renderers differ. Some require a blank line before a list or table. Some do not support tables at all. Check how your platform renders the file rather than assuming.
- Plain-text destinations. In a plain-text email or chat message, real markup may not exist. A hyphen list is then the conventional fallback and is acceptable, because readers understand it. Keep the lines short and put a blank line before and after.
- Decorative lines. A row of dashes or equals signs used as a divider is a visual trick. Use a horizontal rule (
---on a line of its own in Markdown) only when a break in topic is real, and prefer a new heading. - Templates. If your organization supplies a template, use its styles even if you would choose a different look. Style changes then happen in one place.
Exercise
A colleague's report uses bold text on its own line for section titles, types "•" at the start of each bullet, and lines up a price list using several spaces. Name the real markup that replaces each of the three, and give one reason each replacement helps a reader who uses a screen reader.
Show answer
Section titles become heading styles (in Markdown, lines starting with ##), so the reader can jump between sections with heading navigation and hear the level. Bullets become a list style (in Markdown, lines starting with "- "), so the screen reader announces a list and the number of items. The price list becomes a table with a header row (in Markdown, pipes and a separator row), so each price is announced together with its column name.
Exercise
You insert a new step between steps 2 and 3 of a procedure whose numbers were typed by hand. What problem results, and how does a real numbered list avoid it?
Show answer
The typed numbers are plain text, so the new step must be given a number by hand and every later step must be renumbered, or the list will contain duplicate or out-of-order numbers. A real numbered list is numbered by the software, so the new item takes its place and the following items renumber automatically.
Exercise
A document has a level 1 title followed directly by a level 3 heading, chosen because level 3 is smaller. What is wrong, and what is the correct fix?
Show answer
The outline skips level 2, so heading navigation and the table of contents show a gap. Change the heading to level 2 to match its position in the outline, and if the size is a problem, adjust the level 2 style definition instead of changing the level.