Several Methods to convert Word into concise HTML-webpage design Column
Word can be directly saved as htm, but even if it is saved as HTML, there will be a lot of waste.Code. Previously, I used the clean up HTML in Dreamweaver to process the unique word tags first, and then delete some font, B, and span tags. Further, use regular expressions in editplus to process the code, and finally get the clean HTML code I want. Of course, the most perfect way is to copy the text and write the HTM tag in the text editor ,:)
Today, we can see the following methods of lifehacker word 2 clean HTM:
1. Use the HTML tidy library project open-source software for processing.
2. Microsoft official site also has an Office 2000 HTML filter 2.0 tool that can be used to process unnecessary code generated when Word2000 is converted to HTML.
3. Use this word HTML cleaner online tool for processing. Only versions below Word2000 can be processed.
4. Some people have given regular expressions (in fact, the above software also uses regular expressions)
Delete unnecessary tags
<[/]? (Font | span | XML | [ovwxp]: W +) [^>] *?>
-Replace any matches with the empty string
Delete unnecessary attributes such as class and style...
<([^>] *) (? : Class | Lang | style | size | face | [ovwxp]: W +) = (? : '[^'] * '| "" [^ ""] * "" | [^>] +) ([^>] *)>
-Replace any matches with <$1 $2>
For more information, see clean word HTML using regular expressions.