.. spelling:: CSS Emoji bolding dk emoji md monospace supertext tt yesnodk yn
Questions can include :ref:`media` such as images, sound or video. Additionally, labels, hints, and choices in an :doc:`xlsform` can all be styled using :ref:`markdown-in-forms`, :ref:`fonts and colors <custom-fonts-colors>`, and :ref:`emoji`.
|select_one yesnodk||coffee||Do you want coffee?||mug.jpg|
|yesnodk||dk||I don't know|
Labels and hints can be styled with one of six header levels.
# Header H1 ## Header H2 ### Header H3 #### Header H4 ##### Header H5 ###### Header H6
A comparison of headline sizes. This exact effect :ref:`cannot be produced using Markdown <one-headline-only>`.
If a Markdown header is used, the label or hint can only be one line of text. Line breaks in the XLSForm cell will break the header styling.
## Attempted H2 Label Header
A line below the headline
### Attempted H3 hint headline,
Here is some text below the headline.
Collect's Markdown support also includes bold and italic styling.
_italic_ *italic* __bold__ **bold**
The label of a form widget is already bold, so bolding text within the label has no effect. Similarly, the hint text of a form widget is already in italics, so italicizing text within the hint has no effect.
|note||emphasis||This label has bold and italic text.||This hint has bold and italic text.|
Collect's Markdown support include hyperlinks, which will open in the device's default browser.
[Link anchor text](link.url)
|note||hyperlink||This label [contains a link](http://example.com).||This hint [contains a link](http://example.com).|
.. versionadded:: 1.15
If you want to include literal asterisks or underscores,
escape them with a back-slash (
If you want to include a literal back-slash,
you'll need to escape that too.
|note||escape_md||# This headline is normal sized||*Asterisks* and _underscores_ and one slash: \|
Many Markdown implementations support inline HTML, but Collect only supports a small subset of HTML elements. Support of HTML is further limited because:
- Your exact Android device, operating system version, and other device-related factors will affect what HTML can be rendered, and how it is rendered.
- HTML is not supported by other form rendering tools in the XForms ecosystem. For example, HTML elements that work in Collect may not work in Enketo.
For these reasons, we do not recommend using HTML in forms (except the
<span> element :ref:`noted below <custom-fonts-colors>`).
.. seealso:: `The list of HTML tags currently supported in Collect <https://www.grokkingandroid.com/android-quick-tip-formatting-text-with-html-fromhtml>`_.
Fonts and colors
font-family, it is best to use generic font categories rather than specific fonts:
This will ensure support across most devices. You can also use specific font choices, but you should test these on the actual devices being used.
These two attributes,
font-family, are the only style attributes supported in Collect.
|note||red||Going <span style="color:red">red</span>|
|note||green||Going <span style="color:#008000">green</span>|
|note||cursive||<span style="font-family:cursive">Cursive text</span>|
|select_one yn||colored_choices||Formatting works on labels for Choices also.|
|note||combo||# <span style="font-family:cursive;color:purple">Color and font styling can be combined.</span>|
Emoji can be used in form labels, hints, and answer choices.
The exact visual representation of each emoji character is controlled by the device operating system, and may vary from device to device. If possible, you should check how your rendered forms look on the devices you are using for data collection.
|select_one pain||pain_level||What is your current pain level?|
.. seealso:: - `Styling prompts in XLSForm <http://xlsform.org/#styling>`_ - :download:`Sample XLSForm with Style </downloads/form-styling/style-example.xlsx>`