Although Microsoft Word gives users the ability to generate XHTML files, the results generally contain an unnecessary amount of specifications that render them largely inaccessible.

Intended Result

Default font and size, enclosed in P tags

"This is a sample of unformatted, normal text."

<p>This is a sample of unformatted, normal text." (default font and size, enclosed in P tag)</p>

Actual Result

XHTML file with embedded styles that fixes text at Times New Roman, 12 point.

This is a sample of
unformatted, normal text.

<p style="font-size:12pt; font-family:'Times New Roman'">This is a sample of
unformatted, normal text.</p>

Here’s the Full Code

This code was generated in Word 2002. For an example of code generated in Word 2008, see the Microsoft Office Page.
Even newer versions generate an extensive number of styles, many of which are usually unnecessary.

Problematic Code Generated by Word


<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40" >
<head >
<meta name=Title content="This is normal unformatted text" >
<meta name=Keywords content="" >
<meta http-equiv=Content-Type content="text/html; charset=utf-8" >
<meta name=ProgId content=Word.Document >
<meta name=Generator content="Microsoft Word 10" >
<meta name=Originator content="Microsoft Word 10" >
<link rel=File-List href="WordtoHTML_files/filelist.xml" >
<title >This is normal unformatted text </title >
<!--[if gte mso 9] > <xml >
<o:DocumentProperties >
<o:Author >Elizabeth Pyatt </o:Author >
<o:Template >Normal </o:Template >
<o:LastAuthor >Elizabeth Pyatt </o:LastAuthor >
<o:Revision >1 </o:Revision >
<o:TotalTime >1 </o:TotalTime >
<o:Created >2003-10-22T19:05:00Z </o:Created >
<o:LastSaved >2003-10-22T19:06:00Z </o:LastSaved >
<o:Pages >1 </o:Pages >
<o:Company >ETS </o:Company >
<o:Lines >1 </o:Lines >
<o:Paragraphs >1 </o:Paragraphs >
<o:Version >10.2418 </o:Version >
</o:DocumentProperties >
</xml > <![endif]-- > <!--[if gte mso 9] > <xml >
<w:WordDocument >
<w:DisplayHorizontalDrawingGridEvery >0 </w:DisplayHorizontalDrawingGridEvery >
<w:DisplayVerticalDrawingGridEvery >0 </w:DisplayVerticalDrawingGridEvery >
<w:UseMarginsForDrawingGridOrigin/ >
<w:Compatibility >
<w:SpaceForUL/ >
<w:BalanceSingleByteDoubleByteWidth/ >
<w:DoNotLeaveBackslashAlone/ >
<w:ULTrailSpace/ >
<w:DoNotExpandShiftReturn/ >
<w:AdjustLineHeightInTable/ >
</w:Compatibility >
</w:WordDocument >
</xml > <![endif]-- >
<style >
<!--
/* Font Definitions */
@font-face
    {font-family:"Times New Roman";
    panose-1:0 2 2 6 3 5 4 5 2 3;
    mso-font-charset:0;
    mso-generic-font-family:auto;
    mso-font-pitch:variable;
    mso-font-signature:50331648 0 0 0 1 0;}
@font-face
    {font-family:Arial;
    panose-1:0 2 11 6 4 2 2 2 2 2;
    mso-font-charset:0;
    mso-generic-font-family:auto;
    mso-font-pitch:variable;
    mso-font-signature:50331648 0 0 0 1 0;}
@font-face
    {font-family:Palatino;
    panose-1:0 2 0 5 0 0 0 0 0 0;
    mso-font-charset:0;
    mso-generic-font-family:auto;
    mso-font-pitch:variable;
    mso-font-signature:50331648 0 0 0 1 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
    {mso-style-parent:"";
    margin:0in;
    margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:12.0pt;
    font-family:Palatino;}
h3
    {mso-style-next:Normal;
    margin-top:12.0pt;
    margin-right:0in;
    margin-bottom:3.0pt;
    margin-left:0in;
    mso-pagination:widow-orphan;
    page-break-after:avoid;
    mso-outline-level:3;
    font-size:13.0pt;
    font-family:Helvetica;}
p.MsoBodyText, li.MsoBodyText, div.MsoBodyText
    {margin:0in;
    margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:12.0pt;
    font-family:Palatino;
    color:#993366;
    font-weight:bold;}
p.HeaderE, li.HeaderE, div.HeaderE
    {mso-style-name:HeaderE;
    margin:0in;
    margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:16.0pt;
    font-family:Palatino;
    font-weight:bold;}
p.SubHeadE, li.SubHeadE, div.SubHeadE
    {mso-style-name:SubHeadE;
    margin:0in;
    margin-bottom:.0001pt;
    text-align:center;
    mso-pagination:widow-orphan;
    font-size:12.0pt;
    font-family:Palatino;
    font-weight:bold;}
p.TitleE, li.TitleE, div.TitleE
    {mso-style-name:TitleE;
    margin:0in;
    margin-bottom:.0001pt;
    text-align:center;
    mso-pagination:widow-orphan;
    font-size:18.0pt;
    font-family:Palatino;
    font-variant:small-caps;}
p.FigureText, li.FigureText, div.FigureText
    {mso-style-name:"Figure Text";
    margin:0in;
    margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:10.0pt;
    font-family:Helvetica;
    font-weight:bold;}
p.RedBold, li.RedBold, div.RedBold
    {mso-style-name:RedBold;
    margin:0in;
    margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:12.0pt;
    font-family:"Times New Roman";
    color:red;
    font-weight:bold;}
p.Sub-SectionHeading, li.Sub-SectionHeading, div.Sub-SectionHeading
    {mso-style-name:"Sub-Section Heading";
    margin-top:0in;
    margin-right:0in;
    margin-bottom:6.0pt;
    margin-left:.25in;
    mso-pagination:widow-orphan;
    font-size:12.0pt;
    font-family:Arial;
    font-weight:bold;}
p.Sub-SectionParagraph, li.Sub-SectionParagraph, div.Sub-SectionParagraph
    {mso-style-name:"Sub-Section Paragraph";
    margin-top:0in;
    margin-right:0in;
    margin-bottom:6.0pt;
    margin-left:.5in;
    mso-pagination:widow-orphan;
    font-size:12.0pt;
    font-family:"Times New Roman";
    letter-spacing:-.5pt;}
p.MainSectionHeading, li.MainSectionHeading, div.MainSectionHeading
    {mso-style-name:"Main Section Heading";
    mso-style-parent:"Heading 3";
    margin-top:0in;
    margin-right:0in;
    margin-bottom:6.0pt;
    margin-left:0in;
    mso-pagination:widow-orphan;
    page-break-after:avoid;
    font-size:16.0pt;
    font-family:Arial;
    font-weight:bold;}
p.TitleHeading, li.TitleHeading, div.TitleHeading
    {mso-style-name:"Title Heading";
    margin:0in;
    margin-bottom:.0001pt;
    text-align:center;
    mso-pagination:widow-orphan;
    font-size:24.0pt;
    font-family:Arial;
    font-weight:bold;}
@page Section1
    {size:8.5in 11.0in;
    margin:1.0in 1.25in 1.0in 1.25in;
    mso-header-margin:.5in;
    mso-footer-margin:.5in;
    mso-paper-source:0;}
div.Section1
    {page:Section1;}
-- >
</style >
</head >

<body bgcolor=white lang=EN-US style='tab-interval:.25in' >

<div class=Section1 >

<p class=MsoNormal >This is a sample of unformatted normal text </p >

</div >

</body >

</html >

Top of Page