Tools to Capture and Convert the Web

Supported CSS attributes when converting HTML to DOCX

GrabzIt's HTML to DOCX converter reads all HTML elements and tries to produce the nearest approximation to each element in DOCX. As we use a browser to do the parse styles of HTML elements either the the browser CSS is used for the element type or custom CSS provided by the HTML.

The table below details how the DOCX text, images, tables and horizontal lines can be styled, while this only gives a broad overview of what the HTML to DOCX convertor does it should enable you to easily create HTML that can be converted into great DOCX documents.

Text
DOCX Attributes CSS Attributes Notes
font font-family
font size font-size
font color color
left and right spacing padding-left, padding-right, margin-left, margin -right
top and bottom spacing padding-top, padding-bottom, margin-top, margin -bottom
line spacing line-height
kerning letter-spacing
highlighting background-color This will only be applied if it matches one of the highlight colours allowed by the DOCX specification: black, blue, cyan, darkBlue, darkCyan, darkGray, darkGreen, darkMagenta, darkRed, darkYellow, green, lightGray, magenta, none, red, white, yellow
bold font-weight
italic font-style
underline text-decoration
underline color text-decoration-color
underline style text-decoration-style
strike through text-decoration
alignment text-align
direction direction
uppercase, lowercase, title case text-transform
small caps font-variant-caps
text indent text-indent
superscript and subscript vertical-align
emboss, engrave, shadow, outline text-shadow
Table
border width border-width
border color border-color
border style border-style
alignment text-align
Table Cell
border width border-width
border color border-color
border style border-style
vertical alignment vertical-align
cell padding padding
Image
left and right spacing padding-left, padding-right, margin-left, margin -right
top and bottom spacing padding-top, padding-bottom, margin-top, margin -bottom
alignment text-align
direction direction
rotation transform
Horizontal Line
border color border-color
border style border-style

Remember you can also split up your DOCX document by using page breaks.

Back to SupportMore Web Capture ArticlesCommunity Web Capture Questions
Try all our premium features for free with a 7 day free trial. Then from $5.99 a month, unless cancelled.
  • More Captures
  • More Features
  • More API's
  • Bigger Scrapes
  • Bigger Captures
  • Bigger Everything
Start Free Trial