什么时候是使用< b>的最佳时间?和< i>代替< strong>和< em>(如果有)

编程入门 行业动态 更新时间:2024-10-27 06:21:05
本文介绍了什么时候是使用< b>的最佳时间?和< i>代替< strong>和< em>(如果有)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

从严格意义上讲,在当今的网站(2008年末以后)中,使用粗体< b> 和斜体< i> 标签的位置是否合适?比更广泛使用的< strong> 和< em> 标签有用吗?

Semantically speaking, is there an appropriate place in today's websites (late 2008+) where using the bold <b> and italic <i> tags are more useful than the more widely used <strong> and <em> tags?

推荐答案

从不.由于它们是表示性标记,因此已在XHTML 2.0中删除.CSS应该用于加粗/斜体显示内容.

Never. They are removed in XHTML 2.0 as they are presentational tags. CSS should be used to bold/italicise content.

编辑:如果您正在寻找一个纯粹的演示标签,那就是带有类和少量CSS的 SPAN 标签的用途.

edit: If you're looking for a purely presentational tag, that's what the SPAN tag with a class and a little CSS is for.

更多推荐

什么时候是使用&lt; b&gt;的最佳时间?和&lt; i&gt;代替&lt; strong&gt;和&

本文发布于:2023-09-12 06:30:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1466872.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:什么时候   时间   amp   gt   lt

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!