如何在HTML / CSS中的一个段落内粗体字? [英] how to bold words within a paragraph in HTML/CSS?

查看:1012
本文介绍了如何在HTML / CSS中的一个段落内粗体字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是网路程式设计的初学者,有一些非常简单的问题。

I am a beginner in web programming and have some very simple questions.

我试图在一个段落中加粗几个字,但我不知道使用HTML / CSS。我已经想出了如何大胆的整个段落,但不是个别的话。

I'm trying to bold several words in one paragraph but I don't know how to do that using HTML/CSS. I've figured out how to bold entire paragraphs, but not individual words yet. How can I bold one word, like "bold" in my example?

这样可以将整个段落加粗:

This bolds an entire paragraph:

<html>
<head>
<style type="text/css">
p.n1
{
    font:15px bold 30px Georgia,serif;
}

</style>
</head>

<body>
<p class="n1">I am in bold. </p>
</body>
</html>


推荐答案

<p><strong>This is in bold.</strong> This is not.</p>

您可能会发现 Mozilla开发人员网络是一个非常方便和可靠的参考。

You might find Mozilla Developer Network to be a very handy and reliable reference.

这篇关于如何在HTML / CSS中的一个段落内粗体字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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