h1h2h3h45h5h6是标准的HTML标签,其中h1最大,h6最小,主要用于标题,合理应用,能更好更快地被搜索引擎收录。在E文的网页中很容易使用,由于中文的字体如果大于14PX的话,会不太好看,所以需在CSS中设定一下。

H1-H6和其他尺寸的对照表,来源:http://www.w3.org/TR/CSS21/fonts.html .

CSS absolute-size values xx-small x-small small medium large x-large xx-large  
HTML headings h6   h5 h4 h3 h2 h1  
HTML font sizes 1   2 3 4 5 6 7

eg1:基本设置

h1,h2,h3,h4,h5,h6{
	margin:0px; /*h1-h6默认有空白,设定外补丁的值为零,以后容易调整。*/
}

eg2:把你的网站名称放在H1或者H2标签中

Fifty Studio

h2{
	padding:10px;
	text-align:center;
	font-size:16px;
}

eg3:带背景和边框的H4标签

About Us

h4{
	border-left: 6px solid #DC4E1B;
	line-height: 20px;
	background: #E9E9E9;
	padding-left: 12px;	
	font-size: 12px;	
}

相关文章:

  • 2022-12-23
  • 2021-12-10
  • 2021-07-02
  • 2021-04-08
  • 2021-08-03
  • 2022-03-05
  • 2021-12-03
  • 2021-07-13
猜你喜欢
  • 2021-06-13
  • 2021-11-21
  • 2022-12-23
  • 2022-12-23
  • 2021-07-19
  • 2023-02-18
  • 2022-12-23
相关资源
相似解决方案