Chrome Dev Tools添加了哪些标签?

时间:2017-03-14 14:48:18

标签: html css tags

这是我的代码,在audi的图像和文本的灰色块之间chrome正在添加实际上不在代码中的标签?谁知道为什么?似乎chrome正在添加许多实际上并不存在的标签:/

    <!DOCTYPE html>
        <html>

        <head>
            <meta charset="utf-8">
            <title>Audi MK Advert</title>
            <style>
                @font-face {
                    font-family: 'audibold';
                    font-style: normal;
                    font-weight: bold;
                    src: url('helper-files/fonts/AudiBold.otf') format('opentype');
                }

                @font-face {
                    font-family: 'audinormal';
                    font-style: normal;
                    font-weight: normal;
                    src: url('helper-files/fonts/AudiNormal.otf') format('opentype')
                }

                @media (min-width: 360px) {
                    table .tnormal {
                        font-size: 11px !important;
                    }
                    table .tnormalsmall {
                        font-size: 9px !important;
                    }
                    table .tbold {
                        font-size: 14px !important;
                    }
                    table .tboldaddress {
                        font-size: 13px !important;
                        font-weight: bold;
                    }
                    table .tboldsmall {
                        font-size: 11px !important;
                    }
                    table .marshall-logo {
                        margin-left: 100% !important;
                    }
                    table .footer {
                        font-size: 7px !important;
                    }
                }
            </style>
        </head>

        <body>

            <!-- Audi Logo Top Right -->
            <table style="float:right" ; display:block; margin-bottom: 10px>
                <tr>
                    <td>
                        <img src="helper-files/imgs/logo.png">
                    </td>
                </tr>
            </table>

            <br>

            <!-- Grey Navbar -->
            <table style="margin:auto; width:100%; background-color:#858585">
                <tr style="display:block;">
                    <td><img src="helper-files/imgs/navbutton2.jpg" style="margin-bottom: 5px"></td>
                    <td><img src="helper-files/imgs/navbutton3.jpg" style="margin-bottom: 5px"></td>
                    <td><img src="helper-files/imgs/navbutton4.jpg" style="margin-bottom: 5px"></td>
                    <td><img src="helper-files/imgs/navbutton5.jpg" style="margin-bottom: 5px"></td>
                    <td><img src="helper-files/imgs/navbutton6.jpg" style="margin-bottom: 5px"></td>
                    <td><img src="helper-files/imgs/navbutton1.jpg" style="margin-bottom: 5px"></td>
                    <td><img src="helper-files/imgs/navbutton7.jpg" style="margin-bottom: 5px"></td>
                </tr>
            </table>

            <!-- Audi Large Photo -->
            <table style="width:100%; margin-bottom:0">
                <tr>
                    <td style=align: "center"><img src="helper-files/imgs/header.jpg" style="width:100%"></td>
                </tr>
            </table>

            <!-- Body of text -->
            <table style="background-color: lightgray; padding-bottom: 20px; color:grey">
                <tr>
                    <td class="tbold" ; style="font-weight:bold; padding-bottom:15px; padding-top: 35px; font-size:35px; padding-left: 15px; padding-right: 15px;font-family: audibold">Whats in the name?</td>
                </tr>

                <tr>
                    <td class="tboldsmall" ; style="padding-bottom:15px; font-weight:bold; padding-right: 15px; padding-left: 15px; font-family: audibold">To reflect Ridgeway’s acquisition by Marshall Motor Holdings plc in May of this year, effective from the 1st of November, we have rebranded to Marshall.</td>
                </tr>

                <br>

                <tr>
                    <td class="tnormal" ; style="padding-bottom:15px; padding-left: 15px; padding-right: 15px; font-family: audinormal">Don’t worry – it’s not all change. Our excellent staff, standards and values will remain the same, ensuring that you receive consistently high levels of service.</td>
                </tr>

                <br>

                <tr>
                    <td class="tnormal" ; style="padding-bottom:15px; padding-left: 15px; padding-right: 15px; font-family: audinormal">The largest expansion acquisition that Marshall Motor Group has made to date, we are now part of a group that operates 103 franchise dealership businesses representing 24 different manufacturer brands across 25 counties in England, with a
                        turnover in excess of £2.1bn per annum and 3,500 colleagues; but you, the customer, are still our Number One!</td>
                </tr>

                <br>

                <tr>
                    <td class="tnormal" ; style="padding-bottom:15px; padding-left: 15px; padding-right: 15px; font-family: audinormal">With Marshall Motor Group (who are the 7th largest UK motor group in the UK), we are in a better position than ever to exceed expectations and adopt 106 years of dedicated Marshall expertise, with customer care and impeccable industry knowledge
                        at the heart of everything we do.</td>
                </tr>

                <br>

                <tr>
                    <td class="tnormal" ; style="padding-bottom:15px; padding-left: 15px; padding-right: 15px; font-family: audinormal">Just like always, we’re with you for the road ahead. Welcome to the next destination of our exciting journey. As part of the rebrand <a href="http://www.marshall.co.uk/" style="text-decoration:none; color:black; font-weight: bold;">ridgeway.co.uk</a> will
                        redirect to our new online home of <a href="http://www.marshall.co.uk/" style="text-decoration:none; color:black; font-weight: bold">marshall.co.uk</a> for all things Audi sales, service and parts!</td>
                </tr>

                <tr>
                    <td class="tbold" ; style="font-weight:bold; font-size:35px; padding-left: 15px; padding-right: 15px; font-family: audibold">Marshall</td>
                </tr>

                <tr>
                    <td class="tbold" ; style="font-weight:bold; font-size:35px; padding-left: 15px; padding-right: 15px; font-family: audibold">The new name for Audi in Oxford and Newbury.</td>
                </tr>

            </table>

1 个答案:

答案 0 :(得分:1)

HTML无效。您看到的额外标签是浏览器尝试纠错的结果。

你还会看到一些额外的元素&#34;添加&#34;其开始和结束标记是可选的(例如,每个表必须有tbody)。这是正常行为而不是问题。

使用a validator标识您的错误,其中包括以下内容:

  • 表格行之间的换行元素
  • 属性之间的分号
  • 引号位于错误位置的属性值

同样使用CSS validator,因为您还有CSS错误(例如使用不存在的属性)。