Html 如何有一个粗体标题文本?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6429346/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to have a bold header text?
提问by sij
I can't find out how to give my header text some (bold) like on this design.
我不知道如何在这个设计上给我的标题文本一些(粗体)。
There is something wrong with my footer too, I can't give it margin-top or margin-botton :/
我的页脚也有问题,我不能给它 margin-top 或 margin-botton :/
I hope someone can give me some tips and tell me what I can do better :)
我希望有人能给我一些提示并告诉我我可以做得更好:)
采纳答案by Filipe Carvalho
For the bold, remove the
对于粗体,删除
<b>TEXT</b>
tags and use
标签和使用
<span style='font-weight: bold;'>TEXT</span>
For the margin, try padding, OR add this before the FOOTER tag
对于边距,尝试填充,或者在 FOOTER 标签之前添加它
<div style="clear: both;"></div>
回答by James R.
For bold text, I prefer to make a boldText class which can be applied to pretty much anything without having to re-declare the style inline: .boldText { font-weight: bold; }
对于粗体文本,我更喜欢制作一个boldText 类,它可以应用于几乎任何东西,而无需重新声明内联样式: .boldText { font-weight: bold; }
<element class="boldText">...</element>
That way your "element" could be a span, p, or entire div if you wanted to.
这样,如果您愿意,您的“元素”可以是跨度、p 或整个 div。
As for the footer margin issue; I just took a look at your site and I'm not seeing anything that looks like an "issue." Did you figure that part out already?
至于页脚边距问题;我刚刚查看了您的网站,但没有看到任何看起来像是“问题”的内容。你已经弄清楚那部分了吗?