SurveyLoopr
Tips & Tricks
10 min read

Style Text in XLSForm: Bold, Colour and Size

Mehrab Ali
Mehrab AliPublished November 5, 2026

To style text in XLSForm, type Markdown into the label or hint cell: **bold**, *italic*, and ## Heading for bigger text. For colour, wrap the words in a span tag: <span style="color:red">Do not read aloud</span>. ODK Collect, ODK Web Forms and KoboCollect show both, and every example below compiles with pyxform and ODK Validate, the same check ODK Central runs when you upload a form.

Download example form (.xlsx)All six examples in one XLSForm, one group each. Tested with pyxform and ODK Validate; free to reuse under CC BY 4.0.Download

How do I make text bold or italic in XLSForm?

Put asterisks or underscores around the words, exactly as in Markdown. A consent note is a good place for it, because the enumerator must not skip the key sentence:

typenamelabelhint
noteconsent_introBefore we start: **taking part is voluntary** and the household can stop at any time.Read this note *word for word* to the respondent.
select_one yes_noconsentDoes the respondent agree to take part?
surveychoicessettings
list_namenamelabel
yes_no1Yes
yes_no0No
surveychoicessettings

Two rules from the ODK documentation decide whether it shows:

  1. Underscores need a space around them. This is _important_ text is italic; This_is_important_ is not. Asterisks are the safer choice.
  2. Labels are already bold and hints already italic in Collect. Bold inside a question label or italics inside a hint can look the same as the text around it, so emphasis is most useful in notes.

How do I make text bigger?

There is no font-size column. Start the cell with a Markdown header instead: # is the largest and ###### the smallest, with a space after the hashes. A section heading as a note works well at the start of each module:

typenamelabel
notesection_b_title## Section B: Water and sanitation
select_one water_sourcemain_waterWhat is the main source of drinking water for the household?
notesection_c_title## Section C: Food consumption
integermeals_yesterdayHow many meals did the household eat yesterday?
surveychoicessettings
list_namenamelabel
water_source1Piped water
water_source2Tube well or borehole
water_source3Protected dug well
water_source4Surface water
water_source-96Other
surveychoicessettings
Warning:

A header only works when it is the only line in the cell. If the label holds a heading and a second line of text, the heading styling breaks. Put the heading in its own note, or keep the label on one line.

How do I change the font colour in XLSForm?

Wrap the words in a span tag with a style attribute. Named HTML colours such as red and green work, and so do hex codes such as #c62828. Here an interviewer instruction is shown in red so it is never read aloud, and a calculated value is highlighted for checking:

typenamelabelcalculation
noteinstruction<span style="color:#c62828">Interviewer: do not read the options aloud.</span>
integerhh_sizeHow many people live in this household?
integerchildren_under5How many of them are under 5 years old?
calculateadults${hh_size} - ${children_under5}
notesize_checkPlease confirm: the household has <span style="color:#c62828">**${adults}** people aged 5 or older</span>.
surveychoicessettings

The tag can hold a ${} reference and Markdown at the same time, as in the last row. When you edit the form in Excel, type the quotes normally; the doubled quotes above are only how CSV writes them.

How do I colour choice labels?

The same tag goes in the label column of the choices sheet. A red-amber-green scale makes a severity question quick to read:

typenamelabel
select_one severityshelter_damageHow badly is the shelter damaged?
surveychoicessettings
list_namenamelabel
severity1<span style="color:#2e7d32">No damage</span>
severity2<span style="color:#ef6c00">Partly damaged, still usable</span>
severity3<span style="color:#c62828">Destroyed or unsafe</span>
surveychoicessettings

Keep the words doing the work. About one man in twelve has some colour blindness, and the colour can disappear in a web form, so the label must make sense without it.

Note:

The ODK documentation says Enketo web forms support Markdown only and do not style choice labels. KoboToolbox web forms run on Enketo, so a coloured choice there shows the tag as plain text or no colour. If your team fills forms in the browser, test before you rely on it.

How do I change the font or centre text?

The span tag also takes font-family. ODK recommends the generic names serif, sans-serif, monospace and cursive, which every phone has; a named font only works if the device has it. Settings can be combined with a semicolon:

typenamelabel
texthh_idEnter the household ID from the listing sheet.
notereceipt_codeWrite this code on the receipt: <span style="font-family:monospace;color:#1565c0">HH-${hh_id}</span>
notethank_you<p style="text-align:center">Thank you for your time.</p>
surveychoicessettings

Centring uses a p or div tag with text-align:center. ODK warns that alignment on choice labels also applies to the list of selected choices, which can look odd on a select_multiple.

How do I show a real asterisk or underscore?

Put a backslash in front of it. Without one, A_12_ or a pair of asterisks can turn part of the label into italics or bold. A literal backslash needs a second backslash:

typenamelabel
textvoucher_codeEnter the voucher code exactly as printed, for example WFP\_12\_B.
notestarred_noteQuestions marked \* are required by the donor.
surveychoicessettings

Common mistakes when styling text

Most styling mistakes compile without any message and only show up on the phone. The one that does fail is a misspelt reference inside the tag:

You wroteWrite insteadWhat you will see
<span style="color:red">${hh_sise}</span>The exact name from the survey sheetReference variables must contain a name from the 'survey' sheet. Could not find the name 'hh_sise'.
<span style="color:red">Red (no closing tag)Close it with </span>No error; the rest of the label may turn red or show the tag
A ## Heading cell with a second lineThe heading alone in its own noteNo error; the heading styling breaks
This_is_important_This is *important*No error; the underscores show as typed
**Bold** inside a question labelBold in a note, or plain label textNo error; looks the same as the rest of the label
A coloured choice label in a KoboToolbox web formWords that work without colourNo error; colour or tag missing in Enketo
font-size in the span styleA Markdown header such as ##No error; ODK documents only colour and font family

For other messages, see common XLSForm errors, or paste the form into the free XLSForm validator.

Does this work the same in ODK, KoboToolbox and SurveyCTO?

The text sits in the same label and hint cells everywhere, but each app draws it differently:

PlatformMarkdown (bold, italics, headers)Span colour and fontChoice labels
ODK Collect and ODK Web FormsYesYesYes
KoboToolbox (KoboCollect)YesYesYes
KoboToolbox web forms (Enketo)YesNot supported per the ODK docs; test itNo
SurveyCTOUse HTML through the form designerHTML in field labelsWeb forms only, not SurveyCTO Collect

SurveyCTO formats labels with HTML through its form designer's editor, and HTML display can be switched off in SurveyCTO Collect's admin settings, so check that setting if tags show as raw text. If one form must run on more than one platform, keep styling light and test it in each app.

If your form uses several languages, style each label:: column on its own: the tags are part of the text, so a translator must keep them (see adding languages to an ODK form).

When is styling worth it?

Use it where a misread costs data: interviewer instructions that must not be read aloud, section headings that show the enumerator where they are, and a summary note that asks for a final check. Colouring every question does the opposite, because nothing stands out any more. For how a question is drawn rather than how its text looks (dropdowns, Likert rows, signature pads), use the appearance column, and for the full list of types see XLSForm question types.

Tip:

You can ask for the styling in plain language instead: "show interviewer instructions in red and add a heading before each section". LooprAI writes the labels and compiles the form with pyxform before anything is saved.

Build my first form free

Next: XLSForm appearance column →

Frequently Asked Questions

How do I make text bold in XLSForm?

Type two asterisks or two underscores on each side of the words, such as **taking part is voluntary**, in the label or hint cell. ODK Collect, Web Forms and KoboCollect show it bold. Question labels are already bold in Collect, so bold shows best in notes.

How do I change the font colour in an ODK form?

Wrap the words in a span tag with a style attribute, such as <span style="color:red">text</span>. Named colours and hex codes like #c62828 both work in labels, hints and choice labels in ODK Collect and Web Forms.

How do I make text bigger in XLSForm?

Start the cell with a Markdown header: # for the largest text down to ###### for the smallest, followed by a space. The header must be the only line in the cell, so put a section heading in its own note.

Why does my styling not show in KoboToolbox web forms?

KoboToolbox web forms run on Enketo, which the ODK documentation says supports Markdown only and does not style choice labels. Bold, italics and headers usually work there, but colours from span tags may not. KoboCollect on Android shows both.

Can I colour the choices of a select_one question?

Yes. Put the span tag in the label column of the choices sheet, for example a green No damage and a red Destroyed. Keep the words clear without colour, because Enketo web forms and SurveyCTO Collect do not show coloured choice labels.

How do I show an asterisk or underscore without formatting?

Put a backslash in front of it, so WFP\_12\_B shows as WFP_12_B and \* shows a single asterisk. Without the backslash, pairs of asterisks or underscores can turn part of the label bold or italic. A literal backslash needs two backslashes.

No Credit Card Required

Build the form first. Add hosting when you need it.

Start free with LooprAI, then deploy a managed ODK Central server or run DataSnap checks when your project is ready.

Automation handles the mechanical work.

Researchers decide what the evidence means.