当前位置:首页 > Web开发 > 正文

一、head标签重点 head meta charset ="utf-8" title 第二天课 / title !-

2024-03-31 Web开发

一、head标签重点

<head> <meta charset="utf-8"> <title>第二天课</title> <!--页面关键字--> <meta name="keywords" content="护士,教师,,空姐"> <!--页面描述--> <meta name="description" content="各类衣饰包罗万象"> <!--页面刷新--> <meta http-equiv="refresh" content="3;url=https://www.baidu.com/"> </head>

二、字符实体
&lt;——小于
&gt;——大于
&nbsp;——空格

三、常见文本标签
<b>——粗体
<u>——下划线
<i>——斜体
<del>——删除线
<strong>——强调(粗体)

四、锚点标签

<body> <h3 id="top"></h3> <a href="#one">第一章</a> <a href="#two">第二章</a> <h4 id="one">第一章</h4> <p style="width: 600px;height: 400px;background-color: blue;"></p> <h4 id="two">第二章</h4> <p style="width: 600px;height: 400px;background-color:yellow;"></p> <a href="#top">返回</a> </body>

五、表格根本
1、跨行:rowspan
2、跨列:colspan
3、表格标题:<caption>
4、表格头部:<th>
5、行与列:<tr><td>

六、样式选择器

1、ID选择器

<head> <style> #one{color:red;} </style> </head> <body> <label id="one">样例1</label> </body>

2、Class选择器

<head> <style> .one{color:red;} </style> </head> <body> <label class="one">样例2</label> </body>

3、标签选择器 

<head> <style> p{color:red;} </style> </head> <body> <p>样例3</p> </body>

七、样式位置

1、外链样式

1)style.css

#one{color:red;} .one{color:yellow;} p{color:blue;}

2)index.html

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <link href="./style.css" rel="stylesheet" type="text/css"> </head> <body> <input id="one"> <input class="one"> <p></p> </body> </html>

2、内置head标签中

温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/file/web/31208.html