Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have a standard document template in word for internal documents. The Graphic Design / Technical Writing staff have all the styles rigged such that we don't have to do any formatting ourselves.

There are some HTML pages we're looking at publishing to our website that we'd really like to be styled the same way as word documents using the template. The styles aren't all that complex, so recreating them in CSS from scratch is possible, if time consuming. So, is it possible to get Word to export the Styles in a document to a CSS file?

share|improve this question
up vote 7 down vote accepted

For the record, this is what I ended up with:

(This all applies to Word 2003, other versions should be similar.)

Under File, choose "Save as Web Page."

In the format pull-down, choose "filtered web page" and save as a .htm file.

Th HTML that gets kicked out is pretty terrible, BUT at the very top of the document is all of the CSS styles in one style block. Ignoring the slightly strange class names, the CSS isn't bad. I found you could just pull that css block out, drop it in a .css file, and html pages pointing at it actually looked just like the word docs.

(And, it already works in IE!)

Clunky, but it works.

share|improve this answer

I believe Word as an Export as HTML or Save as HTML option.

When I started in web work (~2002) the output from this was abhorrent.

I would manually skin the styles in CSS. If it's not that complicated then it should be no problem at all for someone competent in HTML / CSS.

share|improve this answer

Late reply, but this export a word document may help better than the built in functionality. It is its own tool and I don't know a ton about css, but it looks like it is doing the job.

Here is the link -

share|improve this answer
Hmmm. I just tried that and the XML output is even worse than the HTML output, which I wound't have though possible. – Electrons_Ahoy Dec 13 '10 at 20:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.