Stray start tag HTML in validator?

前端 未结 4 1410
陌清茗
陌清茗 2021-01-04 21:50

I am trying to validate this HTML document in http://validator.w3.org/#validate_by_input but I am getting the following errors:

Line 3, Column 47: Stray start tag ht

相关标签:
4条回答
  • 2021-01-04 22:08

    Correct conditional comments:

    <!--[if IE 7]><html lang="en" class="ie7"><![endif]-->
    <!--[if IE 8]><html lang="en" class="ie8"><![endif]-->
    <!--[if IE 9]><html lang="en" class="ie9"><![endif]-->
    <!--[if (gt IE 9)|!(IE)]><html lang="en"><![endif]-->
    <!--[if !IE]><html lang="en-US"><![endif]-->
    
    0 讨论(0)
  • 2021-01-04 22:14

    You don't close them. That's all and you define 2 html tags now.

    0 讨论(0)
  • 2021-01-04 22:18

    You start with a html-tag that's always present and then you add html-tags depending on version of IE so you might very well end up with multiple html-tags.

    0 讨论(0)
  • 2021-01-04 22:20
    <!DOCTYPE html>
    <!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
    <!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
    <!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
    <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
    

    Use this file and then start tag...

    0 讨论(0)
提交回复
热议问题