html標題標簽一般指兩種:
1.是指title標簽 (title標簽在head標簽里面,head標簽是告訴瀏覽器和搜索引擎,頁面主體是干什么的)
2.是指H標簽(H標簽是body標簽里面,body標簽是給用戶看的,是直接顯示到瀏覽器中,常用的是h1,h2,h3等; )
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>通高科技</title>
- <style>
- h1{
- display: block;
- background-color: antiquewhite;
- height: 200px;
- width: 220px;
- float: left;
- margin-left: 5px;
- }
- .p1{
- color: green;
- font-size: 18px;
- }
- .p2{
- text-align: center;
- }
- .p3{
- line-height: 200px;
- }
- </style>
- </head>
- <body>
- <h1 class="p1">標題默認未距中</h1>
- <h1 class="p1 p2">標題設置水平距中</h1>
- <h1 class="p1 p2 p3">標題設置垂直水平都距中</h1>
- </body>
- </html>
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>通高科技</title>
- <style>
- .p1{
- color: green;
- }
- .p2{
- font-size: 10px;
- }
- </style>
- </head>
- <body>
- <h1 class="p1">未設置標題字體大小</h1>
- <h1 class="p1 p2">設置標題字體20px</h1>
- </body>
- </html>
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>通高科技</title>
- <style>
- .p1{
- color: green;
- }
- </style>
- </head>
- <body>
- <h1 class="p1">標題顏色</h1>
- </body>
- </html>