错误:CSS:文本解析错误

时间:2018-03-01 20:09:01

标签: html css w3c-validation

我刚刚在W3C上验证了我的HTML,并找回了以下错误:

错误:CSS:文本解析错误 - 它正在讨论侧边栏容器DIV。

我做错了什么?我有一些与同一个侧边栏容器div相关的错误。

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Prisma Kitchens</title>
        <meta charset="utf-8"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="desctiption" content="Kitchen designers in Manchester.">
        <meta name="author" content="Prisma Kitchens">

        <link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
        <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
        <link rel="stylesheet" href="css.css" style="text/css">
        <link rel="stylesheet" href="responsive.css" media="screen and (max-width:970px)" style="text/css>
    </head>
    <body>
            <div class="sidebar-container">
            <div class="sidebar">
            <div class="logo">
            <!--Logo is here-->
            </div>
            <div class="links">
                <ul>
                    <li><a href="index.html">home</a></li>
                    <li><a href="about.html">about</a></li>
                    <li><a href="services.html">services</a></li>
                    <li><a href="gallery.html">gallery</a></li>
                    <li><a href="contact.html">contact</a></li>
                </ul>
            </div>
    </div>
    </div>

    <div class="right-container">
            <div class="head_image_mobile"></div>
            <div class="heading_image">
            <!--Holds the image at top of page-->
            </div>
            <div class="content">
            <div class="subheading">Why Choose Prisma Kitchens?</div>

            <a class="button" href="about.html">Learn More...</a>
            <div class="content_gap"></div>
            <div class="subheading">What Can We Offer?</div>

            <a class="button" href="services.html">Our Services...</a>
            <div class="content_gap"></div>


            </div>

    </body>
    </html>

1 个答案:

答案 0 :(得分:0)

type="text/css"而不是style="text/css"。此外,"遗失了type="text/css,最后遗漏了</div>

清理

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Prisma Kitchens</title>
        <meta charset="utf-8"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="desctiption" content="Kitchen designers in Manchester.">
        <meta name="author" content="Prisma Kitchens">
        <link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
        <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
        <link rel="stylesheet" href="css.css" type="text/css" >
        <link rel="stylesheet" href="responsive.css" media="screen and (max-width:970px)" type="text/css">
    </head>
    <body>
        <div class="sidebar-container">
            <div class="sidebar">
                <div class="logo">
                    <!--Logo is here-->
                </div>
                <div class="links">
                    <ul>
                        <li><a href="index.html">home</a></li>
                        <li><a href="about.html">about</a></li>
                        <li><a href="services.html">services</a></li>
                        <li><a href="gallery.html">gallery</a></li>
                        <li><a href="contact.html">contact</a></li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="right-container">
            <div class="head_image_mobile"></div>
            <div class="heading_image">
                <!--Holds the image at top of page-->
            </div>
            <div class="content">
                <div class="subheading">Why Choose Prisma Kitchens?</div>
                <a class="button" href="about.html">Learn More...</a>
                <div class="content_gap"></div>
                <div class="subheading">What Can We Offer?</div>
                <a class="button" href="services.html">Our Services...</a>
                <div class="content_gap"></div>
            </div>
        </div>
    </body>
</html>