html-示例代码
2024-09-16 09:29:04
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html">
<head>
<meta charset="UTF-8"/> <meta http-equiv="refresh" content="3"/>
<!--
<meta http-equiv="Refresh" content="3;url=http://www.baidu.com" />
-->
<meta name="keywords" content="测试所有代码"/>
<meta name="descrtions" content="测试代码"/>
<meta http-equiv="x-ua-compatible" content="ie=IE9"/>
<title>所有标签代码示例</title>
<link rel="icon" href="img/favicon.ico">
<link rel="stylesheet" href="css/common.css">
</head>
<body>
<div id="top"></div>
<h1>1)各种符号</h1>
空格:
大于号:>
小于号: <
<h1>2)段落换行</h1>
<p>我家中华人民</p>
<h1>3)h标签</h1>
<h1>h1</h1>
<h2>h2</h2>
<h3>h3</h3>
<h4>h4</h4>
<h5>h5</h5>
<h5>h6</h5>
<hr/>
<h1>4) 行内标签span</h1>
<span>1111</span>
<h1>5)a标签</h1>
<a href="http://www.baidu.com" target="_blank">点我跳百度</a>
<a href="#top">页内跳转到顶部:锚使用</a>
<h1>6)form表单</h1>
<form action="baidu.com" method="get" enctype="multipart/form-data">
<!-- 用于点击用户名,使得关联的标签获取光标-->
<label for="username">用户名:</label>
<!-- 普通输入框,name是传输给后台变量名-->
<input id="username" type="text" name="username" />
<br/>
<label for="password">密码:</label>
<input id="password" type="password" name="password" />
<br/>
<input type="button" value="操作键钮">
<br/>
<!-- 单先框,name属性(name相同则互斥) value是传递的值-->
<input type="radio" name="sex" value="0">男</input>
<input type="radio" name="sex" value="1">女</input>
<br/>
<!-- input type="checkbox" 复选框value,name属性(批量获取数据)单先框,复选框设置默认旨-->
<input type="checkbox" name="check" checked="checked" value="1">足球</input>
<input type="checkbox" name="check" value="2">蓝球</input> <br/>
<label for="multi">多行标签:</label>
<textarea id="multi" name="multi" ></textarea>
<br/>
<label for="select">select:</label>
<select id="select" name="select" size="2"> <!-- 默认size=1-->
<option value="1" selected="selected">1</option><!--默认值-->
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
<!--分组-->
<br/>
<p>分组</p>
<select >
<optgroup label="上海">1</optgroup><!--分组名称-->
<option value="2">2</option>
<option value="3">3</option>
</select>
<!-- 元素组合表单中的相关数据-->
<fieldset>
<legend>登录</legend>
<label>用户名</label>
<label>密码</label>
</fieldset> <input type="file" value="上传文件">
<input type="reset" value="重值">
<input type="submit" value="提交">
</form> <h1>7) 表格</h1>
<table border="1">
<caption>横跨两列的单元格</caption>
<tr>
<th>姓名</th>
<th colspan="2">电话</th>
</tr>
<tr>
<td>111</td>
<td>222</td>
<td>3333</td>
</tr>
<tr>
<td rowspan="2">111</td>
<td>222</td>
<td>3333</td>
</tr>
<tr>
<td>111</td>
<td>222</td> </tr>
</table>
<br/>
<table border="1">
<thead>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
</thead> <tfoot>
<tr>
<td>Sum</td>
<td>$180</td>
</tr>
</tfoot> <tbody>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</tbody>
</table> <h1>列表</h1>
<h2>无序列表</h2>
<ul>
<li>111</li>
<li>222</li>
</ul>
<h2>有序列表</h2>
<ol>
<li>Coffe</li>
<li>2222</li>
</ol>
<h2>自定义列表</h2>
<dl>
<dt>11</dt><dd>black</dd>
<dt>222</dt>
<dd>white</dd>
</dl>
</body>
</html>
1)各种符号
空格: 大于号:> 小于号: <
2)段落换行
我家中华人民
3)h标签
h1
h2
h3
h4
h5
h6
4) 行内标签span
1111
5)a标签
6)form表单
用户名:
密码:
男 女
足球 蓝球
多行标签:
select:
1
2
3
4
分组
1
2
3
登录 用户名 密码
7) 表格
姓名 | 电话 | |
---|---|---|
111 | 222 | 3333 |
111 | 222 | 3333 |
111 | 222 |
Month | Savings |
---|---|
Sum | $180 |
January | $100 |
February | $80 |
列表
无序列表
- 111
- 222
有序列表
- Coffe
- 2222
自定义列表
- 11
- black
- 222
- white
最新文章
- Tomcat的优化
- unity渲染层级关系小结(转存)
- Pyqt 以OOP方式动画的效果改变自身窗体大小
- 封装用className选元素
- nslayoutConstraint
- HDU 2059 龟兔赛跑(动态规划)
- I.MX6 Linux mipi配置数据合成
- 开心菜鸟系列----函数作用域(javascript入门篇)
- react-native 自己搭建热更新服务器
- Web前端开发的一点记录
- 8611 大牛之路I
- JavaScript中的该如何[更好的]做动效
- Asp.net MVC4高级编程学习笔记-视图学习第三课Razor页面布局20171010
- Python Django-入门到进阶
- linux系统执行mysql脚本:Can&#39;t connect to local MySQL server through socket &#39;/tmp/mysql.sock&#39;
- 非阻塞I/O事件驱动
- 51nod 1503 猪和回文(dp滚存)
- p2693 Combination Lock
- 項目当中使用的easyui的模板crud页面
- java-为什么非静态内部类中不能有static修饰的属性,但却可以有final常量?