Web前端之html

html 超文本标记语言(网页)

标签结构:<标签名>

<html>
    <head></head>
    <body></body>
</html>

常用标签

1.标题:<h1>...<h6>
2.段落(正文):<p>
3.分隔符:<hr>
换行符:<p>、<br/>
4.图片:<img src="">
5.超链接:<a href="">

网页间跳转:<a href="目标网页地址">提示文字</a>
网页内跳转:<a href="#另一个标签的id值">提示文字</a>
图片作为超链接:<a href=""><img src="图片路径"></a>

注:标签属性的格式:属性名=“属性值”
6.特殊转义字符:<-----&lt >-----&gt

列表

1.有序列表

<ol>
   <li></li>
</ol>

2.无序列表

<ul>
   <li></li>
</ul>

表格

<table border="1" width=100%>
    <h1>...<h6>
    <thead><tr>
            <th></th>
        </tr>
    </thead>  
    <tbody><tr><td></td><td></td>
        </tr>
        <tr>
            <td></td>
            <td></td>
        </tr>
    </tbody>  
    <tfoot></tfoot></table>

合并列:colspan
合并行:rowspan

表单

<input type="text">—–文本框标签
<input type="password">—–密码框
<input type="radio" name="" checked>—–单选按钮
<input type="checkbox" name="" checked>—–复选按钮
注:name取名相同的视为一组,checked表示是否默认选中
<input type="file">—–文件选择框
<input type="button" value="按钮文字">—–按钮
<input type="reset" value="重置">—–重置按钮
<input type="submit" value="提交">—–提交按钮
`按钮文字

下拉列表:

<select>
    <option selected></option>
</select>

注:selected默认选中

文本域标签:

<textarea></textarea>

附:

readonly只读
disabled禁用
required是否必填

猜你喜欢

转载自blog.csdn.net/Eternity_y/article/details/82495140