font-weight 是用來設定字體是否加粗的樣式,而 font-weight:bold 即設定文字字體加粗。
p{font-weight:bold} 設定 p 段落內文字字體加粗。
span{font-weight:bold} 設定 span 內字體加粗。
簡單的 DIV CSS 佈局加粗示例:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>font-weight:bold實例</title>
<style>
.exp{ font-weight:bold}
</style>
</head>
<body>
<p>外部CSS樣式設置<span class="exp">字體加粗</span>!</p>
</body>
</html>

外部樣式實現字體加粗 font-weight:bold 設置實例