Html_表格标签+超链接标签+框架标签

<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
		<title>表格演示</title>
	</head>
	<body>
		<table border="3" background="#ff0000" width="500">
			<tbody>
				<caption>表格的下一级标签默认是tbody,不定义也存在!</caption>
				<tr>
					<td>单元格(以后DOM解析会用到)</td>
				</tr>
			</tbody>
		</table>
		<h1>不规则表格演示2</h1>
		需求:画个两行的表格,第1行有两个单元格,第2行只有一个单元格!
		但是第1行的第1个单元格占两行!
		方法:先数有多少行,再数行里面有多少单元格!
		<table border="3"bordercolor="#ff0000">
			<tr>
				<th rowspan="2">第1单元格占两行 rowspan=2</th>
				<td>上面单元格</td>
			</tr>
			<tr>
				<td>下面单元格</td>
			</tr>
		</table>
		<hr />
		<h1>不规则表格演示1</h1>
		需求:画个两行的表格,但是第1行的第1个单元格占了两列!
		方法:先数有多少行,再数行里面有多少单元格!
		<table border="3"bordercolor="#ff0000">
			<tr>
				<th colspan="2">第1行占两个单元格 colspan=2</th>
			</tr>
			<tr>
				<td>第1个单元格</td>
				<td>第2个单元格</td>
			</tr>
		</table>
		<hr />
		<h1>表格演示</h1>
		<table border="3" bordercolor="#0000ff" cellpadding="6" cellspacing="20" width="500">
			<caption>caption封装的是表格标题</caption>
			<tr>
				<th>th里面封装的是加粗并居中的表头</th>
				<td>td里面封装的是单元格数据</td>
			</tr>
			<tr>
				<td>td里面封装的是单元格数据</td>
				<td>td里面封装的是单元格数据</td>
			</tr>
		</table>
	</body>
</html>

 

 

<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
		<title>超链接演示</title>
	</head>
	<body>
		<a name="文档顶部">文章开始位置</a>
		<h1>超链接演示</h1>
		<a href="">链接为空时,将打开文档所在的目录,href属性默认是文本协议</a>
		<a href="http://www.baidu.com" target="_blank">百度一下(必需写上协议名称)</a>
		<a href="../myweb/chm.jpg">美女图片</a>
		<a href="mailto:pre_eminent@163.com">联系我们</a>
		点击之后启动Outlook Express
		<a href="http://www.baidu.com/movies/big_fish.mkv">大鱼</a>
		<a href="thunder://asdfalkjwaejajafioi==">迅雷资源</a>
		点击之后,启动迅雷了...
		<a href="javascript:void(0)" οnclick="alert('hello world!')">取消点击效果</a>
		<hr />
		<table height="800" border="3">
			<tr>
				<td></td>
			</tr>
		</table>
		<a href="#文档顶部">回到文章开始位置</a>
	</body>
</html>



 

<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
		<title>框架演示(框架放在头和体之间,且不能有其他内容)</title>
	</head>
		<frameset rows="30%,*">
			<frame src="hyperlink.html"/ name="top_frame">
			<frameset cols="30%,70%">
				<frame src="tableDemo.html"/ name="left_frame">
				<frame src="index.html"/ name="right_frame">
			</frameset>
		</frameset>
	<body>
	</body>
</html>


 画中画标签iframe

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>
	这里面是title
</title>
</head>

<body>
<font color="#000099" size="+3">演示iframe标签(画中画,页面中挖个洞)</font>
<iframe src="1.html" height="300",width="500">
	如果看到这些文字,说明您的浏览器不支持iframe标签
</iframe>

<iframe src="www.baidu.com/xxx.js" height="0",width="0">
	如果iframe的高宽都被设置为0,
	并且访问地址是一个js脚本,就可能实现一个恶意代码!
</iframe>

</body>
</html>


 

 

头内标签和其他标签

 

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>头标签和其他标签演示</title>
	<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
	<!--3秒钟后,自动跳转到百度首页-->
	<meta http-equiv="refresh" content="30;url=http://www.baidu.com" />
	<!--每1秒钟刷新一次(需求:像股市大盘)-->
	<meta http-equiv="refresh" content="1" />
</head>
<body background="../myweb/333.jpg">
	<h1>头标签和其他标签演示</h1>
	X的平方:x<sup>2</sup>
	<br />
	a中下标为i的元素:a<sub>i</sub>
	<marquee behavior="alternate">像皮球,来回跳</marquee>
	<marquee behavior="scroll" >穿透</marquee>
	<marquee behavior="slide" direction="down">仅一次就不动了(用户体验最佳)</marquee>
	<hr>
	<pre>
		Class Person{
			public static void main(String[] args){
				System.out.println("Pre标签可以保持代码原来排版样式");
			}
		}
	</pre>
	写在DIV前面
	<div>
		didv区域标签,封装整行,只是用来封装数据没有特殊含义
	</div>
	写在DIV后面
	<p>p段落标签,不仅后面有换行,前后都会有一空行</p>
	<span>span行内标签,后面没有换行</span>
</body
</html>


 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值