HTML Standard: <input> tag

<input> tag

Inserts an input field.

Attributes
Attribute Description
class One or more classes.
id Id.
style Inline styles. Styles can also be applied using style tags.
type Input type: text, password (as text), checkbox, radio (as checkbox).
size Field size. For text and password types.
value Input value. For text and password types.
checked For checkbox and radio types.
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:

Example #2

The resulting Word document looks like: