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

I'm have a tough time getting my HTML that I am pasting into word to be converted to the proper styles I want.

My HTML includes: dt, dd, h1-h7, p, li, ul... etc.

dt and dd are not working. Word thinks they are paragraphs and applies the "Normal" style to them.

h1-h7 work great.

li works great.

What can I put into word so that when I paste in these dt & dd they will select a proper style?

EDIT: I certainly appreciate the responses received so far, however nobody has really answered this yet. I cannot decide what the export medium is for this job, as I am not the decision maker. The requirement is MS Word files. There will be headers and footers, page numbering and a table of contents to the project, but whenever I paste HTML into Word the same problem happens: certain tags are styled and others are ignored.

My guess is that this is a deficiency/bug in MS Word, so I will go ahead and open a ticket with Microsoft.

share|improve this question

migrated from May 18 '12 at 18:29

This question came from our site for professional and enthusiast programmers.

Why would you do that? Word isn't meant for that. It tries to do it (HTML mail anyone) and fails miserably. – PeeHaa May 18 '12 at 15:30
MS Word is a definite no no for making html. Use a free program like notepad++ – Sam May 18 '12 at 15:34
Word will assign classes to styles. If you are trying to create a formatted Word document using HTML, this may help. – Remou May 18 '12 at 15:36
Remou: so if there is a style in Word that has a class name that matches it should apply the style? This is hugely helpful if that's gonna work! – Geekster May 18 '12 at 15:41
If you want a document containing HTML, use a PDF. – Diodeus May 18 '12 at 15:42

I have found a suitable answer to this.

  • By stylizing each HTML object in the source, Word will then apply styles if you "paste" with the option "Keep source formatting", most of the kinds of CSS will be converted into a Word style.


This will have the same formatting in HTML when you copy/paste to Word with "Keep Formatting" selected.

<h1 style="border:1px solid #CCC;font-size:1.5em">Title</h1>
share|improve this answer

Unfortunately Word has issues with many different HTML/CSS tags, so I'm afraid it's a case of trial and error. When it comes to dt and dd you could replicate the formatting you want by using CSS classes and then applying them to suitable HTML alternatives.

One good tip is that Word has big difficulties with different style sections (especially when it comes to mail.) So always only have only <style></style> section if you're using classes.

share|improve this answer

Word has difficulties with formatting on pasted html. I've had success with color, background-color, margin and page-break-before:always (avoid padding except on td elements and avoid page-break-after). Also font, font-size, font-weight and tables work well. It can see general css style rules which are not just embedded as a style attribute directly on the element. Try to simplify your source html as much as possible.

share|improve this answer

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.