我是一名网络开发人员,越来越多地使用 Vim 来编写网站代码。是否有任何 HTML 验证实用程序(或技术)可以在不离开 shell 的情况下获取我正在处理的任何文件并根据其 DOCTYPE 进行验证?
最佳答案
从 sourceforge 中整理并在 shell 上执行
tidy -errors -q -f error_file.txt the_file.html
2016 年 7 月编辑: 源伪造版本已过时(请参阅@phihag 的评论)。它的继任者可以在 http://www.html-tidy.org/ 找到和 https://github.com/htacg/tidy-html5 .
http://www.html-tidy.org/上的历史页面 指出:
In 2015 a group of concerned developers, users, and software integrators formed HTACG with the goal of revitalizing Tidy, which had fallen into a non-maintained state. As a W3C Community Group, HTACG was deemed worthy by the W3C, and W3C passed ownership of their project to HTACG, where it is currently being developed and prepped for a new, stable, and modern release.
关于html - 从命令行验证 HTML,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1837624/