HTML表格标签和超链接标签

来源:互联网 发布:分布式云计算 编辑:程序博客网 时间:2024/05/18 09:10

表格标签

<table border=1 bordercolor="red" cellpadding=10 cellspacing=0        width=500  align="center" height="100">        <tbody>            <!--表格的下一级标签是tbody,不定义也存在-->        <caption>表格主题</caption>        <tr>            <th rowspan=2>个人信息</th>            <td align="left">张三</td>        </tr>        <tr>            <td>30</td>        </tr>        <tr>            <th colspan=2>个人信息</th>        </tr>        <tr>            <td align="right">张三</td>            <td>30</td>        </tr>        </tbody>    </table>

table标签的效果
border:表示table的边框的大小
bordercolor:表示边框的颜色
cellpadding:是指单元格内文字与边框的距离
cellspacing:是指单元格和外部边框的距离
单元格指的就是一个个的小方框
align:排列,有center,left,right等常用
rowspan:合并多少行
colspan:合并多少列

超链接标签
<a href=""></a>

<a href="http://www.sohu.com.cn" target="_blank">搜狐</a><hr/><a href="http://www.sohu.com.cn" target="_blank"><img scr="1.jpg"></a><hr/><a href="imgs/1.jpg">美女图片</a><hr/><a href="mailto:abs@sina.com">联系我们</a><hr/><a href="http://www.xunlei.com/movies/fczlm.rmvb">复仇者联盟</a><br/><a href="thunder://wertyuioasdfghjklwertyuio==">复仇者联盟</a><a href="javascript:void(0)" onclick="alert('我弹')">这是一个超链接</a>

href:要链接的地址
target:在新窗口中打开,要链接的地址

0 0
原创粉丝点击