📜  在 HTML5 中弃用的 HTML 标签是什么?

📅  最后修改于: 2021-10-28 03:07:23             🧑  作者: Mango

在本文中,我们将看到 HTML5 中各种已弃用的 Html 标签及其替代标签。不推荐使用的标签是那些允许使用但不推荐使用并且正在被更新的标签替换的标签。当以其他方式获得相同的属性时,标记或属性会贬值。被丢弃并使用较新的原因有几个:

  • 有几个标签可以帮助完成相同的任务。因此,源代码的长度也减少了,从而提高了整体性能。
  • 管理大型代码将很困难,并且不可能立即修改这样的源代码。这会增加开发时间以及代码中的歧义。
  • 有时,如果我们需要使用特定的代码块来执行特定任务,则可能会发生这种情况,然后我们可能需要再次重新编写代码。所有这些因素都有助于增加复杂性以及不值得开发过程的开发时间。

为此,HTML5 中引入了几个标签和属性。这是下面讨论的已弃用标签的完整列表。
HTML 5 弃用标签:下面给出了弃用标签的完整列表。

TAGS 

DESCRIPTIONS                

ALTERNATIVE TAGS

To Specify a basefont. font style sheets.
It specifies font text, size and color. font-family, font-size, color.
It specifies a centered Text. text-align:center.
It specifies a strike-through text. text-decoration.
Defines big text. Use CSS properties or Heading tags.
It specifies a directory list. ul tag.
It specifies a single-line input field. form tag.
It specifies an applet. object tag.
 An acronym is defined using this tag. Use abbr. 
It is used to define a noframe section. Either use an iframe and CSS instead or use server-side include to generate complete pages with the various invariant parts merged in.
</strong></td> <td>Renders text between the start and end tags without interpreting the HTML in between and using a monospaced font.</td> <td>Use pre and code instead.</td> </tr> <tr> <td><strong><noembed></strong></td> <td>A tag makes it easy to supply alternative content that tells users what they are missing.</td> <td>Use object instead of embed when fallback is necessary.</td> </tr> <tr> <td><strong><plaintext></strong></td> <td>It is used to render all text in the document exactly as it was typed in.</td> <td>Use the “text/plain” MIME type instead.</td> </tr> <tr> <td><strong><frameset></strong></td> <td>It specifies a set of frames.</td> <td>Either use iframe and CSS instead or use server-side include to generate complete pages with the various invariant parts merged in.</td> </tr> <tr> <td><strong><frame></strong></td> <td>It specifies a frame.</td> <td>Either use iframe and CSS instead or use server-side include to generate complete pages with the various invariant parts merged in.</td> </tr> <tr> <td><strong><u></strong></td> <td>It specifies an underlined text.</td> <td>text-decoration.</td> </tr> <tr> <td><strong><tt></strong></td> <td>Defines teletype text.</td> <td>Use CSS properties.</td> </tr> <tr> <td><strong><s></strong></td> <td>Specify a strike-through text.</td> <td>text-decoration.</td> </tr> </tbody> </table> </figure> <p style="text-align:justify"> <strong>HTML 弃用属性</strong><span>:</span>还删除了几个标签属性。以下是删除了属性及其相应受影响标签(元素)的表格,即。这些属性已被永久删除的元素。 </p> <figure class="table"> <table> <thead> <tr> <th> <h4 style="text-align:center">REMOVED ATTRIBUTES</h4> </th> <th> <h4 style="text-align:center">TAGS IMPACTED</h4> </th> <th> <h4 style="text-align:center">ALTERNATIVES</h4> </th> </tr> </thead> <tbody> <tr> <td><strong>rev</strong></td> <td>a, link</td> <td> <p style="text-align:justify">Use the rel attribute.</p> </td> </tr> <tr> <td><strong>longdesc</strong></td> <td>img, iframe</td> <td> <p style="text-align:justify">Use a regular element to link to the description.</p> <p></p> <div class="_ap_apex_ad" id="d6f45c53-ff16-4cc5-8b91-eb6ee7037116" style="min-height:280px"></div> <p></p></td> </tr> <tr> <td><strong>version</strong></td> <td>Html</td> <td> <p style="text-align:justify">Unnecessary, not required to mention.</p> </td> </tr> <tr> <td><strong>charset</strong></td> <td>a, link</td> <td> <p style="text-align:justify">Use an HTTP Content-Type header on the linked resource instead.</p> </td> </tr> <tr> <td><strong> name</strong></td> <td>a, img</td> <td> <p style="text-align:justify">Use the id attribute instead.</p> </td> </tr> <tr> <td><strong>nohref</strong></td> <td>area</td> <td> <p style="text-align:justify">Omitting the href attribute is sufficient. The nohref attribute is unnecessary, not required to mention.</p> </td> </tr> <tr> <td><strong>usemap</strong></td> <td>input</td> <td> <p style="text-align:justify">Use img instead of input for image maps.</p> </td> </tr> <tr> <td><strong>target</strong></td> <td>link</td> <td> <p style="text-align:justify">Unnecessary, not required to mention.</p> </td> </tr> <tr> <td><strong>scheme</strong></td> <td>meta</td> <td> <p style="text-align:justify">Use only one scheme per field, or make the scheme declaration part of the value.</p> </td> </tr> <tr> <td><strong>codetype</strong></td> <td>object</td> <td> <p style="text-align:justify">Use the data and type attributes to invoke plugins.</p> <p></p> <div class="_ap_apex_ad" id="1b4172cd-acc7-4363-9184-3fadd3cdabcf" style="min-height:280px"></div> <p></p></td> </tr> <tr> <td><strong>declare</strong></td> <td>object</td> <td> <p style="text-align:justify">Repeat the object element completely each time the resource is to be reused.</p> </td> </tr> <tr> <td><strong>standby</strong></td> <td>object</td> <td> <p style="text-align:justify">Optimise the linked resource so that it loads quickly or, at least, incrementally.</p> </td> </tr> <tr> <td><strong>valuetype</strong></td> <td>param</td> <td> <p style="text-align:justify">Without declaring value types, use name and value attributes.</p> </td> </tr> <tr> <td><strong>language</strong></td> <td>script</td> <td> <p style="text-align:justify">Use the type attribute.</p> </td> </tr> <tr> <td><strong>abbr</strong></td> <td>td, th</td> <td> <p style="text-align:justify">Use text that begins in an unambiguous and terse manner, and include any more elaborate text after that.</p> </td> </tr> <tr> <td><strong>axis</strong></td> <td>td, th</td> <td> <p style="text-align:justify">Scope attribute should be used.</p> </td> </tr> </tbody> </table> </figure> <div class="_ap_apex_ad" id="82d2079a-8120-480f-9fc7-5cda825d56e7" style="min-height:280px"></div> <p></p></div> </article> </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://www.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>