什么可能导致粗体标签< b>被忽略? [英] What could cause a bold tag <b> to be ignored?

查看:33
本文介绍了什么可能导致粗体标签< b>被忽略?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Drupal中显示某些HTML时遇到问题,但是我不是100%地确定这是Drupal问题.我正在使用粗体标签来强调单词,但它不会显示为粗体.它认为这可能是我使用的Google字体,因此我将其禁用,但仍然遇到问题.

I have an issue with some HTML displayed in Drupal, but I am not 100% sure this is a Drupal issue. I am using the bold tag to emphasize a word, but it is not displayed as bold. It thought it might be the Google font I used, so I disabled it, but I still get the issue.

我检查了页面来源:

<div id="begin_block">
  <div id="fw_begin"><h2>Find words <b>beginning</b> with:</h2></div>
    <div id="inp_begin"><input type="text" /></div>
    <div id="aft_begin">(max. 5 characters)</div>
    <div id="but_begin"><button type="button">Go</button></div>
</div>

但我仍然得到:

什么可能导致此问题?

更新

我正在使用的主题中确实有一个 reset.css .粗体定义为:

There is indeed a reset.css in the theme I am using. Bold is defined as:

b{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}

推荐答案

一个CSS(重置)工作表可能已定义 b {font-weight:normal;} .要修复"样式,请添加 b {font-weight:bold;} .

A CSS (reset) sheet has probably defined b{font-weight:normal;}. To "fix" the style, add b{font-weight:bold;}.

此外,他

Also, he <strong> tag is semantically more correct, so use that instead of <b>.

这篇关于什么可能导致粗体标签&lt; b&gt;被忽略?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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