HTML Standard: <select>, <option> tags

<select>, <option> tags

Inserts a select with options.

Attributes
Attribute Description
class One or more classes.
id Id.
selected (only for option tag) Marks an option as selected.
style Inline styles.
value (only for option tag) States the value of the option.
Styles
Style Description
color
  • hexadecimal color
  • HSL color
  • HSLA color (alpha value is ignored)
  • predefined/cross-browser color
  • RGB color
  • RGBA color (alpha value is ignored)
display
  • none
font-family
  • Arial, Helvetica, "Times New Roman", Verdana... Any font can be applied, but it must be available in the DOCX or in the OS.
font-size
  • large
  • larger
  • length: cm, em, ex, in, mm, pt, pc, px, percentage, rem (as em)
  • medium
  • small
  • smaller
  • x-large
  • x-small
  • xx-large
  • xx-small
font-style
  • italic
  • normal
  • oblique
font-weight
  • bold
  • bolder
  • normal
  • 700, 800, 900
text-align
  • center
  • justify
  • left
  • right
text-decoration
  • line-through
  • double-line-through
  • underline
Code samples

Example #1

The resulting Word document looks like: