HTML表格标签和超链接标签

表格标签

<table border=1 bordercolor="red" cellpadding=10 cellspacing=0
        width=500  align="center" height="100">
        <tbody>
            
        <caption>表格主题caption>
        <tr>
            <th rowspan=2>个人信息th>
            <td align="left">张三td>
        tr>
        <tr>
            <td>30td>
        tr>
        <tr>
            <th colspan=2>个人信息th>
        tr>
        <tr>
            <td align="right">张三td>
            <td>30td>
        tr>
        tbody>
    table>

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

超链接标签

<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:[email protected]">联系我们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:在新窗口中打开,要链接的地址

你可能感兴趣的:(html)