61,115
社区成员
发帖
与我相关
我的任务
分享
<html>
<body>
<p>
kdkkdkdkk
<p>
<div>
kkkkk
</p>
</body>
</html>
使用tidy处理后
C:\Users\Administrator\Desktop>tidy s.htm
line 1 column 1 - Warning: missing <!DOCTYPE> declaration
line 8 column 1 - Warning: inserting implicit <p>
line 6 column 1 - Warning: missing </div>
line 2 column 1 - Warning: inserting missing 'title' element
line 5 column 1 - Warning: trimming empty <p>
line 8 column 1 - Warning: trimming empty <p>
Info: Document content looks like HTML5
6 warnings, 0 errors were found!
<!DOCTYPE html>
<html>
<head>
<meta name="generator" content=
"HTML Tidy for HTML5 (experimental) for Windows https://github.com/w3c/tidy-html5/tree/c63cc39">
<title></title>
</head>
<body>
<p>kdkkdkdkk</p>
<div>kkkkk</div>
</body>
</html>
About this fork of Tidy: http://w3c.github.com/tidy-html5/
Bug reports and comments: https://github.com/w3c/tidy-html5/issues/
Or send questions and comments to html-tidy@w3.org
Latest HTML specification: http://dev.w3.org/html5/spec-author-view/
HTML language reference: http://dev.w3.org/html5/markup/
Validate your HTML5 documents: http://validator.w3.org/nu/
Lobby your company to join the W3C: http://www.w3.org/Consortium
C:\Users\Administrator\Desktop>
所以这个东西,自动化处理并不能解决这个问题.