2010-01-27 66 views

回答

2

我的意思是格式化? Visual Studio可以做到这一点。 Web Expressions或Express Edition是首发。 Notepad ++可能是一个选项。

2

整洁(tidy.sourceforge.net)可以格式化你的HTML /验证/产自HTML和其他东西XHTML。

1

HTMLTidy - 真是一个整洁的工具。我用它所有的时间。您可以根据您的偏好设置/大小写/您可以想象的任何设置创建自己的配置文件,并将其用于您的所有项目。

我也很喜欢HTML Beauty. NET - 这是一个模拟HTML整洁净。

此示例说明如何删除标签,并从HTML文档中的C#和VB.Net

 
string htmlPath = @"D:\Beautifier tests\simple.htm"; 
string resultPath = @"D:\Beautifier tests\Result.htm"; 

SautinSoft.HtmlBeautifier h = new SautinSoft.HtmlBeautifier(); 
h.RemoveTagsWithDataByMask = new string [] {"style", "script"}; 
int result = h.BeautifyFile(htmlPath, resultPath); 

//Show result 
if (result==0) 
System.Diagnostics.Process.Start(resultPath); 
0

尝试www.beautifyhtml.com。它美化,整理和验证你的HTML在线。