The font defined under the large frame of the website, including the font size and color.ArticleIt may be text copied from other websites. The copy process also retains the font description information. When the document is displayed on the page, the font defined in the document is used by default. If the font in the document does not exist, the global font defined under the big frame is displayed. Therefore, the content of the website may look messy. Some articles have a large font and some others have a small font and are not beautiful. Just fine if it can be unified!
I am not familiar with HTML, CSS, and so on. I don't know if I can set it to invalidate the font content defined in the article.
Stupid people have a stupid way to modify the article in a unified manner and delete all users' font definitions! Haha! If it is manually completed, this is a very heavy task. First, you need to preview the page. If it is not uniform, modify the font. Fortunately, the editor has a "clear format" option and select all text, click OK, and then save ...... Also very troublesome
If you only want to modify the font, the most convenient way is to directly modify the database, extract the articles from the database, delete the labels related to the font, and then write them back to the database.
I checked the HTML reference manual. There are two ways to define the font:
1. Use the <font> label, for example:
< P > < Font Size = "2" Face = "Verdana" > This is a paragraph. </ Font > </ P > < P > < Font Size = "3" Face = "Times" > This is another paragraph. </ Font > </ P >
This method is not recommended.
2. Use the style definition, for example:
<PStyle= "Font-family: verdana; font-size: 80%; color: Green">This is a paragraph with some text in it.</P>
You only need to delete the definition part of the font, and use the python Regular Expression module to replace it with no pressure:
DefFormat (data ):'''Delete all font and style labels'''P= Re. Compile (R'<Font. *?> | </Font> | style = \".*? \"') RET= P. sub ('', Data)IfRET! =Data:ReturnRETElse:ReturnNone
Python to handle database-related operations to pay attention to update the data method, you can refer to this article: http://www.cnblogs.com/ma6174/archive/2013/02/21/2920126.html