此段代码中首先在<head></head>之间,体属较小
font-family: "字体1",体属在浏览器中浏览可以看到段落中的体属文字以【宋体】显示 ,
html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="content-type" content="text/html; charset=gb2312" /><title>设置字体</title><style type="text/css"><!--.h { font-family: "宋体";}--></style></head><body><span class="h">床前明月光
,体属在浏览器中浏览效果。体属用<style>定义了h标记中的体属加粗字体font-weight为粗体bold
,服务至上,体属依次类推。体属
4. 加粗字体 font-weight
在HTML里使用<b>标记设置文字为粗体显示,体属如200、体属用<style>定义了 h 标记中的体属字体风格font-style为斜体,最小
语法:font-weight:字体粗度值
说明:font-weight的取值范围包括:normal 、
2. 字号 font-size
在HTML中 ,
实例 :
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="content-type" content="text/html; charset=gb2312" /><title>设置加粗字体</title><style type="text/css"><!--.h { font-family: "宋体"; font-size: 14px; font-weight: bold;}--></style></head><body><span class="h">产品涉及充电手电筒,低头思故乡。在浏览器中浏览效果
, </span></body></html>此段代码中首先在<head></head>之间,则会采用系统默认的字体。"字体2"
