Html HTML代码分析器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1605423/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 01:06:19  来源:igfitidea点击:

HTML code analyzer

html

提问by RKh

Is there any HTML code analyzing tool that suggests tips to improve the HTML code?

是否有任何 HTML 代码分析工具可以建议改进 HTML 代码的技巧?

回答by meder omuraliev

http://validator.w3.org/

http://validator.w3.org/

The most important tool, to ensure validity.

最重要的工具,确保有效性。

Articles such as this for tips on writing semantic, clean html and avoid common html-diseases like divitus, classitus, optimizing your code, and other best practices.

诸如此类的文章提供有关编写语义、清洁 html 和避免常见 html 疾病(如 divitus、classitus、优化代码和其他最佳实践)的提示。

Guides such as these which are more in-depth and cover accessibility, development in general, css, JS/DOM ( since DOM iswhat is used for HTML ).

导游像这些更深入的一般,CSS和覆盖交通方便,发展,JS / DOM(DOM以来什么是用于HTML)。

And the mother of all:

以及所有人的母亲:

Though it's not very newbie friendly and I'd recommend guides like htmldog instead, but this would be the go-to source for looking up directly from the source.

虽然它对新手不是很友好,我会推荐像 htmldog 这样的指南,但这将是直接从源中查找的首选源。

回答by popester

For standards? This one is good: http://validator.w3.org/

为了标准?这个很好:http: //validator.w3.org/

Or do you want perf or readability or ...?

或者你想要性能或可读性还是......?

回答by Quentin

Sitesifteris decent (although it identifies issues and links to documentation, it isn't an automated fixup tool — but most problems can't be automatically fixed anyway)

Sitesifter很不错(虽然它可以识别问题和文档链接,但它不是自动修复工具——但大多数问题无论如何都不能自动修复)

回答by austincheney

The reporting feature of Pretty Diff offers suggestions on improving your HTML plus a bunch of stats.

Pretty Diff 的报告功能提供了有关改进 HTML 的建议以及一系列统计数据。

http://prettydiff.com/?m=beautify&html

http://prettydiff.com/?m=beautify&html

回答by Giovani Spagnolo

I would add to the list the following code analysis tools:

我会将以下代码分析工具添加到列表中: