跨类 [英] Span Class

查看:64
本文介绍了跨类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

新手问题......


编码使用< span class = bold> ...< / span>是否更好?围绕文字

我想要应用内联粗体样式而不是< b> ...< / b> ?


如果是这样,为什么?

Newbie question...

Is it better coding to use <span class=bold>...</span> around text to
which I want to apply an inline bold style rather than <b>... </b> ?

If so, why?

推荐答案

2006年3月2日星期四19 :45:03 + 0100,Dan< te ******* @ gmail.com>写道:


也许你已经知道了,但在进一步讨论之前:你是否熟悉

< b $ b< b $ b< b&b网址:HTTP://www.safalra.com/special/googlegroupsreply/>请注意

的那一点。谢谢,现在回答你的问题:
On Thu, 02 Mar 2006 19:45:03 +0100, Dan <te*******@gmail.com> wrote:

Maybe you already know, but before discussing any further: are you
familiar with the contents of
<URL:http://www.safalra.com/special/googlegroupsreply/> Please take note
of that bit. Thanks, now to your question:
新手问题...


那没关系,我们都是这样开始的。 :-)

编码使用< span class = bold> ...< / span>是否更好?围绕文字
我想要应用内联粗体样式而不是< b> ...< / b> ?
如果是这样,为什么?
Newbie question...
That''s okay, we all started out that way. :-)
Is it better coding to use <span class=bold>...</span> around text to
which I want to apply an inline bold style rather than <b>... </b> ?

If so, why?




看,你问的是非常好的问题。你想知道原因:-)


好​​吧,在你想要应用

内联粗体样式的文本周围放置任何东西之前,问问自己为什么你想要那样做?如果要强调这一点,有两种方法可以实现:


< p>如果你想要< em>这部分要强调< / em>,你只是给了它。

如果你想要< strong>更强调强调< / strong>,这就是使用它。< / p>


在许多图形浏览器中,重点变为斜体和强烈

强调变为粗体。

参见< URL:http:// www.w3.org/TR/html401/struct/text.html#edef-EM> for

其他内联元素,赋予一些文本含义。肯定会有一两个你可以用于你的目的。


如果它与你需要的不同,那么,那就是这是

样式表的来源(参见本集团的主题)。用一个简单的


em {

font-style:normal;

font-weight:bold; }





strong {

font-style:italic;

字体重量:正常;你可以反转这两个标准渲染:-)想想还有什么呢?你可以这样做。$ / b。
>
所以,简而言之:首先要知道为什么,你问的问题。为什么你要b b $ b想要一个特定的文本突出,不同。把它标记为

这样,让CSS为你照顾好看。

-

______PretLetters:

|博客| http://www.pretletters.net/weblog/weblog.html |

| webontwerp | http://www.pretletters.net/html/webontwerp.html |

| zweefvliegen | http://www.pretletters.net/html/vliegen.html |



See, you ask the very good questions. You want to know why :-)

Well, before puting anything around text to which you want to apply an
inline bold style, ask yourself why you want to do that? If it is to give
the bit emphasis, there are two ways to accomplish that:

<p>If you want <em>this part to have emphasis</em>, you just gave it that.
If you want <strong>stronger emphasis</stronger>, this is what to use.</p>

In many graphical browsers emphasis gets rendered italic and strong
emphasis gets rendered bold.
See also <URL:http://www.w3.org/TR/html401/struct/text.html#edef-EM> for
other inline elements that give meaning to a bit of text. There''s bound to
be one or two you could use for your purposes.

And if it renderes differently from what you need, well, that''s where the
stylesheets come in (see, back on topic for this group). With a simple

em {
font-style:normal;
font-weight:bold; }

or

strong {
font-style:italic;
font-weight:normal; }

you can reverse the standard rendering of those two :-) Think of what else
you can do that way.

So, in short: first know the why, the very question you ask. Why do you
want a specific piece of text to stand out, to be different. Mark it up as
such, and let CSS take care of the looks for you.
--
______PretLetters:
| weblog | http://www.pretletters.net/weblog/weblog.html |
| webontwerp | http://www.pretletters.net/html/webontwerp.html |
|zweefvliegen | http://www.pretletters.net/html/vliegen.html |




Barbara de Zoete写道:

Barbara de Zoete wrote:
2006年3月2日星期四19:45:03 + 0100,Dan< te ******* @ gmail.com>写道:

也许你已经知道了,但在进一步讨论之前:你是否熟悉
< URL:http://www.safalra.com/的内容特别/ googlegroupsreply />请注意那一点。谢谢,现在回答你的问题:

好吧,在你想要应用
内联粗体样式的文本之前,问问自己为什么要这样做?如果要重点强调,有两种方法可以实现:

感谢您的提问。是的,我在这种情况下的目的是强调文本。


< p>如果你想要< em>这部分重点< / em>,你只是给了它。
如果你想要< strong>更强调强调< / strong>,这就是使用它。< / p>

在许多图形浏览器中,重点变为斜体和强烈的
强调变得粗体。
另见< URL:http://www.w3.org/TR/html401/struct/text.html#edef-EM>用于
其他内联元素,赋予一些文本含义。肯定会有一两个你可以用于你的目的。

如果它与你需要的不同,那么,那就是
样式表进来(参见,回到这个组的主题)。用简单的

em {
font-style:normal;
font-weight:bold; }



强烈的{
font-style:italic;
font-weight:normal;你可以反转那两个的标准渲染:-)想想你还能用那种方式做什么。
On Thu, 02 Mar 2006 19:45:03 +0100, Dan <te*******@gmail.com> wrote:

Maybe you already know, but before discussing any further: are you
familiar with the contents of
<URL:http://www.safalra.com/special/googlegroupsreply/> Please take note
of that bit. Thanks, now to your question:

Well, before puting anything around text to which you want to apply an
inline bold style, ask yourself why you want to do that? If it is to give
the bit emphasis, there are two ways to accomplish that:
Thanks for asking. Yes, my purpose in this case is to emphasize text.

<p>If you want <em>this part to have emphasis</em>, you just gave it that.
If you want <strong>stronger emphasis</stronger>, this is what to use.</p>

In many graphical browsers emphasis gets rendered italic and strong
emphasis gets rendered bold.
See also <URL:http://www.w3.org/TR/html401/struct/text.html#edef-EM> for
other inline elements that give meaning to a bit of text. There''s bound to
be one or two you could use for your purposes.

And if it renderes differently from what you need, well, that''s where the
stylesheets come in (see, back on topic for this group). With a simple

em {
font-style:normal;
font-weight:bold; }

or

strong {
font-style:italic;
font-weight:normal; }

you can reverse the standard rendering of those two :-) Think of what else
you can do that way.




非常感谢。这是非常有用的信息。另外,我认为我应该使用< em>
和< strong> over< i>和< b>因为后面的标签不是

必然与语音阅读器兼容?是< b>和< i>标签

实际上已弃用了吗?


再次感谢,

Dan



Thanks so much. This is extremely informative. Also, I assume I should
use <em> and <strong> over <i> and <b> because the latter tags are not
necessarily compatible with speech readers? Are <b> and <i> tags
actually deprecated though?

Thanks again,
Dan




Barbara de Zoete写道:

Barbara de Zoete wrote:
2006年3月2日星期四19:45:03 +0100,Dan< te ***** **@gmail.com>写道:

也许你已经知道了,但在进一步讨论之前:你是否熟悉
< URL:http://www.safalra.com/的内容特别/ googlegroupsreply />请注意那一点。谢谢,现在回答你的问题:

好吧,在你想要应用
内联粗体样式的文本之前,问问自己为什么要这样做?如果要重点强调,有两种方法可以实现:

感谢您的提问。是的,我在这种情况下的目的是强调文本。


< p>如果你想要< em>这部分重点< / em>,你只是给了它。
如果你想要< strong>强调强调< / strong>,这就是使用它。< / p>
.... em {
font-style:normal;
font-weight:bold; }



强烈的{
font-style:italic;
font-weight:normal;你可以反转那两个的标准渲染:-)想想你还能用那种方式做什么。
On Thu, 02 Mar 2006 19:45:03 +0100, Dan <te*******@gmail.com> wrote:

Maybe you already know, but before discussing any further: are you
familiar with the contents of
<URL:http://www.safalra.com/special/googlegroupsreply/> Please take note
of that bit. Thanks, now to your question:

Well, before puting anything around text to which you want to apply an
inline bold style, ask yourself why you want to do that? If it is to give
the bit emphasis, there are two ways to accomplish that:
Thanks for asking. Yes, my purpose in this case is to emphasize text.

<p>If you want <em>this part to have emphasis</em>, you just gave it that.
If you want <strong>stronger emphasis</stronger>, this is what to use.</p> .... em {
font-style:normal;
font-weight:bold; }

or

strong {
font-style:italic;
font-weight:normal; }

you can reverse the standard rendering of those two :-) Think of what else
you can do that way.




非常感谢。这是非常有用的信息。另外,我认为我应该使用< em>
和< strong> over< i>和< b>因为后面的标签不是

必然与语音阅读器兼容?是< b>和< i>标签

实际上已弃用了吗?


再次感谢,

Dan



Thanks so much. This is extremely informative. Also, I assume I should
use <em> and <strong> over <i> and <b> because the latter tags are not
necessarily compatible with speech readers? Are <b> and <i> tags
actually deprecated though?

Thanks again,
Dan


这篇关于跨类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆