HTML
来源:互联网 发布:java给字符串数组赋值 编辑:程序博客网 时间:2024/06/04 19:23
具体参考html参考手册
1.背景图片
<html>
<head>
<title>背景设置</title>
</head>
<body background="./images/a.jpg">
<!--<body background="images/a.jpg">-->
</body>
</html>
2.背景颜色
<html>
<head>
<title>背景设置</title>
</head>
<body bgcolor="green">
</body>
</html>
3.标签文字
<html>
<head>
<title>标签文字</title>
</head>
<body>
<!--前三个最好记住-->
<b>黑</b>
<i>斜</i>
<u>下划线</u>
<!--前三个最好记住-->
<s>中线</s>
<sup>上标</sup>
<sub>下标</sub>
</body>
</html>
4.横线
<html>
<head>
<title>横线</title>
</head>
<body>
<hr>
<hr size="5">
</body>
</html>
5.定位
<html>
<head>
<title>字体设置</title>
</head>
<body>
<div>
123465456<p>
555555555
</div>
<div align="center">
123465456<p>
555555555
</div>
<span>
123465456<p>
555555555
</span>
<span align="center">
123465456<p>
555555555
</span>
</body>
</html>
6.链接
<html>
<head>
<title>字体设置</title>
</head>
<body>
<!--在本窗口中打开,默认是self-->
<a href="http://www.baidu.com">链接到百度</a>
<!--在本窗口中打开-->
<a href="http://www.baidu.com" target="_self">链接到百度</a>
<!--弹出窗口-->
<a href="http://www.baidu.com" target="_blank">链接到百度</a>
</body>
</html>
7.字体
<html>
<head>
<title>字体设置</title>
</head>
<body>
<font size="4" color="red">红色,四号字体</font>
<font size="5" color="blue">蓝色,五号字体</font>
</body>
</html>
<html>
<head>
<title>字体设置</title>
</head>
<body>
<!--此标签自动换行<p>-->
<h1>h1</h1>
<h2>h2</h2>
<h3>h3</h3>
<h4>h4</h4>
<h5>h5</h5>
<h6>h6</h6>
</body>
</html>
8.图片
<html>
<head>
<title>字体设置</title>
</head>
<body>
<img src="images/a.jpg" width=300 height=300 alt="这是养眼图">图片</img>
</body>
</html>
9.table
<html>
<head>
<title>演示表格</title>
</head>
<body>
<h1>演示表格</h1>
<hr>
<table border="1" width="50%">
<tr align="center">
<td>姓名</td>
<td>科目</td>
<td>成绩</td>
</tr>
<tr>
<td>张三</td>
<td>汇编</td>
<td>90</td>
</tr>
<tr>
<td>张三</td>
<td>java</td>
<td>100</td>
</tr>
<tr>
<td colspan="2" align="center">合计</td>
<td>190</td>
</tr>
</table>
</body>
</html>
10.表单text
<html>
<head>
<title>表单text</title>
</head>
<body>
<h1>演示text输入域</h1>
<hr>
<form action="表单text.html" method="get">
登录名:<input type="text" name="username"><br>
密码 :<input type="password" name="password"><br>
<input type="submit" value="登录">
</form>
</body>
</html>
11.表单select
<html>
<head>
<title>表单select</title>
</head>
<body>
<h1>演示select输入域</h1>
<hr>
<form action="表单select.html" method="get">
<select>
<option>c语言</option>
<option>vb</option>
<option>delphi</option>
</select>
<p>
<select multiple>
<option>c语言</option>
<option>vb</option>
<option>delphi</option>
</select>
<input type="submit" value="选择">
</form>
</body>
</html>
12.表单checkbox
<html>
<head>
<title>表单checkbox</title>
</head>
<body>
<h1>演示checkbox输入域</h1>
<hr>
<form action="表单checkbox.html" method="get">
<input type="checkbox" name="language" checked="true">c语言
<input type="checkbox" name="language">vb
<input type="checkbox" name="language">java<p>
<input type="submit" value="选择">
</form>
</body>
</html>
13.表单radio
<html>
<head>
<title>表单radio</title>
</head>
<body>
<h1>演示radio输入域</h1>
<hr>
<form action="表单radio.html" method="get">
<input type="radio" name="language" checked="true">c语言
<input type="radio" name="language">vb
<input type="radio" name="language">java<p>
<input type="submit" value="选择">
</form>
</body>
</html>
14.表单textarea
<html>
<head>
<title>表单textarea</title>
</head>
<body>
<h1>演示textarea输入域</h1>
<hr>
<form action="表单textarea.html" method="get">
<textarea name="desc">
</textarea>
<input type="submit" value="选择">
</form>
</body>
</html>
15.表单提交
<html>
<head>
<title>字体设置</title>
</head>
<body>
<h1>演示textarea输入域</h1>
<hr>
<form action="表单textarea.html" method="get">
姓名:<input type="text"> <br>
描述:
<textarea name="desc">
</textarea> <br>
<input type="submit" value="提交(submit)"><br>
<input type="button" value="提交(button)"><br>
<input type="reset" value="重置"><br>
<input type="image" src="images/a.jpg"><br>
</form>
</body>
</html>
16.表单隐含域
<html>
<head>
<title>表单隐含域</title>
</head>
<body>
<h1>演示隐含域</h1>
<hr>
<form action="表单隐含域.html" method="get">
<!--班级代码:<input type="hidden" name="classId" value="1253415"> <br>-->
<input type="hidden" name="classId" value="1253415"> <br><!--班级代码隐含,不能修改,但能提交-->
班级名称:<input type="text" name="className"> <br>
<input type="submit" value="提交(submit)"><br>
</form>
</body>
</html>
17.iframe 内嵌表格table
<html>
<head>
<title>字体设置</title>
</head>
<body>
<h1>演示iframe</h1>
<hr>
<iframe src="iframe_table.html">
</body>
</html>
<html>
<head>
<title>字体设置</title>
</head>
<body>
<table border="1" width="100%">
<tr>
<td>asdfasdf</td>
<td>asdfasdf</td>
<td>asdfasdf</td>
<td>asdfasdf</td>
</tr>
<tr>
<td>asdfasdf</td>
<td>asdfasdf</td>
<td>asdfasdf</td>
<td>asdfasdf</td>
</tr>
<tr>
<td>asdfasdf</td>
<td>asdfasdf</td>
<td>asdfasdf</td>
<td>asdfasdf</td>
</tr>
<tr>
<td>asdfasdf</td>
<td>asdfasdf</td>
<td>asdfasdf</td>
<td>asdfasdf</td>
</tr>
</table>
</body>
</html>
18.框架
- frameset.html
<html>
<head>
<title>演示表格</title>
</head>
<frameset rows="15%,*">
<frame name="top" src="frameTop.html">
</frame>
<frameset cols="15%,*">
<frame name="left" src="frameLeft.html">
</frame>
<frame name="right" src="frameRight.html">
</frame>
</frameset>
</frameset>
</html>
- frameTop.html
<html>
<head>
<title>字体设置</title>
</head>
<body>
<h1 align="center">学生管理系统</h1>
</body>
</html>
- frameLeft.html
<html>
<head>
<title>字体设置</title>
</head>
<body>
<a href="student_query.html" target="_top">查询学生</a><p>
<a href="student_add.html" target="_self">添加学生</a><p>
<a href="student_modify.html" target="_blank">修改学生</a><p>
<a href="student_del.html" target="right">删除学生</a><p>
</body>
</html>
- frameRight.html
<html>
<head>
<title>字体设置</title>
</head>
<body>
<h1>欢迎使用学生管理系统</h1>
</body>
</html>
- student_add.html
add
- student_del.html
del
- student_modify.html
modify
- student_query.html
query