链接的使用
- 代码及其注释
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<h4>1.外部链接</h4>
<a href="http://www.qq.com" target="_blank"> 腾讯 </a>
target 打开窗口的方式 默认是 _self 当前窗口打开页面 _blank新窗口打开页面
<a href="http://www.bkys.world" target="_self">bkys</a>
<h4>内部链接:网站内部页面间的相互链接</h4>
创建页面
<a href="01-vscode创建页面.html" target="_blank">创建页面</a>
<h4> 空链接 #</h4>
<a href="#">空链接</a>
<h4>下载链接 文件是.exe zip等</h4>
<a href="1.zip">下载链接</a>
<h4>网页元素的链接</h4>
<a href="http://bkys.fun"><img src="111.jpg"/></a>
<h4>锚点链接</h4>
<a href="01-vscode创建页面.html" target="_blank">创建页面</a><br/>
<!-- 我想喝咖啡 -->
<!-- 这个公司没有年终奖的,兄弟们别指望了,别来了
我写的这个代码一堆bug,你不用改了-->
空格 空格
<!-- <p>这是一个段落标签 -->
< p >
</body>
</html>
- 效果展示
表格的使用
- 代码及其注释
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<p>表格</p>
<table align="center" border="1" cellpadding="20" cellspacing="0" width="700" heigth="300">
<tr>
<th>排名</th>
<th>关键词</th>
<th>趋势</th>
<th>今日搜索</th>
<th>最近七日</th>
<th>相关链接</th>
</tr>
<tr>
<td>1</td>
<td>鬼吹灯</td>
<td><img src="down.jpg"></td>
<td>123</td>
<td>456</td>
<td> <a href="#">贴吧</a> <a href="#">图片</a> </td>
</tr>
</table>
</body>
</html>
- 效果展示
表格之合并单元格
- 代码及其注释
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<table align="center" border="1" cellpadding="20" cellspacing="0" width="700" heigth="300">
<thead>
<tr>
<!-- <th></th> -->
<th colspan="2"></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="2"></td>
<td></td>
<td></td>
</tr>
<tr>
<!-- <td></td> -->
<td></td>
<td></td>
</tr>
</tbody>
</table>
</body>
</html>
- 效果展示
列表的使用
- 代码及其注释
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<h1>无序列表</h1>
<h4>你喜欢得食物</h4>
<ul>
<li>苹果</li>
<li>香蕉</li>
<li>罐头</li>
<li>
<P>
world
</P>
</li>
<ul>
<h1>有序列表</h1>
<h4>粉丝排行榜</h4>
<ol>
<li>张 300</li>
<li>张 200</li>
<li>张 100</li>
</ol>
<h1>自定义列表</h1>
<dl>
<dt>关注我们</dt>
<dd>新浪微博</dd>
<dd>官方微信</dd>
<dd>联系我们</dd>
</dl>
</body>
</html>
- 效果展示
表单的使用
- 代码及其注释
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>表单元素</title>
</head>
<body>
<form action="xxx.php" method="get">
<!-- text 文本框 -->
<label for="text">用户名: </label> <input type="text" id="text" name="username" value="请输入用户名" maxlengh="6"><br/>
<!-- password 密码框 -->
密码: <input type="password" name="pwd"><br/>
<!-- radio 单选框 -->
<!-- name 表单元素的名字 -->
<!-- 单选按钮和复选框可以设置默认属性check属性 -->
性别: 男<input type="radio" name="sex" checked="checked"> 女<input type="radio" name="sex"> <br>
<!-- checkbox 复选框 -->
爱好: 吃饭<input type="checkbox" name1="hobby"> 睡觉<input type="checkbox" name="hobby"> 学习<input type="checkbox" name="hobby">
<br>
<!-- 普通按钮 button 后期结合js-->
<input type="button" value="获取短信验证码">
<input type="submit" value="免费注册">
<!-- 重置 -->
<input type="reset" value="重新设置">
<br>
<!-- 文件域 上传文件 -->
上传图像:<input type="file"><br>
<!-- 下拉表单元素 -->
籍贯:
<select>
<option>陕西</option>
<option>上海</option>
<option>北京</option>
<option>大连</option>
<option selected="selected">火星</option><br>
</select>
<!-- 文本域 -->
意见反馈:<textarea cols="50" rows="5">反馈</textarea>
</form>
</body>
</html>
- 效果展示