📜  HTML5-不推荐使用的标记和属性

📅  最后修改于: 2020-10-23 06:32:00             🧑  作者: Mango


不推荐使用的标签

以下元素在HTML5中不再可用,并且CSS可以更好地处理其函数-

Tags (Elements) Description
Defines an acronym
Defines an applet
Defines an base font for the page.
Defines big text
Defines centered text
Defines a directory list
Defines text font, size, and color
Defines a frame
Defines a set of frames
Defines a single-line input field
</td> <td>Defines a noframe section</td> </tr> <tr> <td><s></td> <td>Defines strikethrough text</td> </tr> <tr> <td><strike></td> <td>Defines strikethrough text</td> </tr> <tr> <td><tt></td> <td>Defines teletype text</td> </tr> <tr> <td><u></td> <td>Defines underlined text</td> </tr> </table> <h2>不推荐使用的属性</h2> <p>HTML5不具有HTML4中的表示形式属性,因为CSS可以更好地处理其功能。 HTML5中的某些属性完全不再被HTML5所允许,并且它们已被完全删除。</p> <p>以下是已删除属性的表及其对应的受影响标签(元素),即。那些属性已被永久删除的元素-</p> <table class="table"> <tr> <th width="30%">Removed Attributes</th> <th>From the Elements</th> </tr> <tr> <td>rev</td> <td>link, a</td> </tr> <tr> <td>charset </td> <td>link and a</td> </tr> <tr> <td>shape</td> <td>a</td> </tr> <tr> <td>coords</td> <td>a</td> </tr> <tr> <td>longdesc</td> <td>img and iframe.</td> </tr> <tr> <td>target</td> <td>link</td> </tr> <tr> <td>nohref</td> <td>area</td> </tr> <tr> <td>profile</td> <td>head</td> </tr> <tr> <td>version</td> <td>html</td> </tr> <tr> <td>name</td> <td>img</td> </tr> <tr> <td>scheme</td> <td>meta</td> </tr> <tr> <td>archive</td> <td>object</td> </tr> <tr> <td>classid</td> <td>object</td> </tr> <tr> <td>codebase</td> <td>object</td> </tr> <tr> <td>codetype</td> <td>object</td> </tr> <tr> <td>declare</td> <td>object</td> </tr> <tr> <td>standby</td> <td>object</td> </tr> <tr> <td>valuetype</td> <td>param</td> </tr> <tr> <td>type</td> <td>param</td> </tr> <tr> <td>axis</td> <td>td and t</td> </tr> <tr> <td>abbr</td> <td>td and t</td> </tr> <tr> <td>scope</td> <td>td</td> </tr> <tr> <td>align</td> <td>caption, iframe, img, input, object, legend, table, hr, div, h1, h2, h3, h4, h5, h6, p, col, colgroup, tbody, td, tfoot, th, thead and tr.</td> </tr> <tr> <td>alink</td> <td>body</td> </tr> <tr> <td>link</td> <td>body</td> </tr> <tr> <td>vlink</td> <td>body</td> </tr> <tr> <td>text</td> <td>body</td> </tr> <tr> <td>background</td> <td>body</td> </tr> <tr> <td>bgcolor</td> <td>table, tr, td, th and body.</td> </tr> <tr> <td>border</td> <td>table and object.</td> </tr> <tr> <td>cellpadding</td> <td>table</td> </tr> <tr> <td>cellspacing</td> <td>table</td> </tr> <tr> <td>char</td> <td>col, colgroup, tbody, td, tfoot, th, thead and tr.</td> </tr> <tr> <td>charoff</td> <td>col, colgroup, tbody, td, tfoot, th, thead and tr.</td> </tr> <tr> <td>clear</td> <td>br</td> </tr> <tr> <td>compact</td> <td>dl, menu, ol and ul.</td> </tr> <tr> <td>frame</td> <td>table</td> </tr> <tr> <td>compact</td> <td>dl, menu, ol and ul.</td> </tr> <tr> <td>frame</td> <td>table</td> </tr> <tr> <td>frameborder</td> <td>iframe</td> </tr> <tr> <td>hspace</td> <td>img and object.</td> </tr> <tr> <td>vspace</td> <td>img and object.</td> </tr> <tr> <td>marginheight</td> <td>iframe</td> </tr> <tr> <td>marginwidth</td> <td>iframe</td> </tr> <tr> <td>noshade</td> <td>hr</td> </tr> <tr> <td>nowrap</td> <td>td and th</td> </tr> <tr> <td>rules</td> <td>table</td> </tr> <tr> <td>scrolling</td> <td>iframe</td> </tr> <tr> <td>size</td> <td>hr</td> </tr> <tr> <td>type</td> <td>li, ol and ul.</td> </tr> <tr> <td>valign</td> <td>col, colgroup, tbody, td, tfoot, th, thead and tr</td> </tr> <tr> <td>width</td> <td>hr, table, td, th, col, colgroup and pre.</td> </tr> </table> </div> </div> </div> </div> </div> </div> <footer> <div class="bg-white text-center pb-1"> <p class="text-body-tertiary pt-3 lh-lg text-opacity-50" id="footer-text">Copyright &copy; 2020 - 2024 版权所有 <br> <a href="https://beian.miit.gov.cn/" target="_blank" class="text-opacity-50 text-body-tertiary mt-1 mb-1">蜀ICP备20006366号-1</a> <br> Made with ❤️ in Chengdu </p> </div> </footer> <!-- 引入Bootstrap JavaScript库 --> <script src="https://unpkg.com/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script> <!-- 引入Meilisearch搜索相关的JavaScript库 --> <script src="https://cdn.jsdelivr.net/npm/@meilisearch/instant-meilisearch/dist/instant-meilisearch.umd.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/instantsearch.js@4"></script> <script src="https://imangodoc.com/static/javascript/meili_custom.js"></script> <!-- 引入prismjs代码高亮相关的JavaScript库 --> <script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/components/prism-core.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/plugins/toolbar/prism-toolbar.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/plugins/autoloader/prism-autoloader.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js"></script> </body> </html>