初识HTML
HTML(HyperText Markup Language,超文本标记语言),前端三剑客之一。
查询文档:www.w3school.com.cn
常见标签
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
| <h1>标题</h1> <p>段落</p>
<div>独占一行,可指定宽高</div> <span>行内元素,不可指定宽高,由内容决定</span>
<img src="url" alt="描述信息">
<video src="url" controls="播放控件">
<audio src="url" controls="播放控件">
<a href="url" target="打开行为(_self 当前页打开, _blank 空白页打开)">
<hr>
<br>
<b> / <strong>
<u> / <ins>
<i> / <em>
<s> / <del>
<form action="表单数据提交至url" method="表单数据发送方式(GET/POST)"> <input type="指定类型" name="变量名" value="变量值"> <input type="text"> <input type="password"> <input type="radio" name="同组radio,变量名应相同"> <input type="checkbox"> <input type="file"> <input type="data/time/datetime-local"> <input type="number"> <input type="email"> <input type="hidden"> <input type="submit/reset/button"> <select> <option value="变量值">选项1</option> </select> <textarea></textarea> </form>
<table style="border-collapse: collapse; 消除表格间隙"> <tr> <th> <td> </tr> </table>
|
特殊字符
空格,
小于,<
大于,>