- <html>
- <head>
- <title>第一个页面</title>
- </head>
- <body>
- hello world
- </body>
- </html>
html 是整个html文件的根标签,代表这是一个html格式
head标签里记录页面的属性
body标签写的是页面上显示的内容
title标签是页面的标题

注释标签
标题标签:h1-h6
hello
hello
hello
hello
hello
hello
段落标签:p
这是一个段落>
p标签之间存在一个空隙,前面没有空格.中间的空格和换行均无效
换行标签:br
br为break的缩写,属于但标签,不需要结束标签
在 css 中我们一般使用 px 作为单位
加粗:Strong标签和 b标签都可倾斜:em标签或者i标签删除线:del标签和s标签下划线:ins标签和u标签
strong 加粗加粗倾斜倾斜删除线删除线下划线下划线
src = "rose.jpg" alt = " 鲜花 " title = " 这是一朵鲜花 " width = "500px" height = "800px"
border = "5px" >
alt: 替换文本 . 当文本不能正确显示的时候 , 会显示一个替换的文字 .title: 提示文本 . 鼠标放到图片上 , 就会有提示 .width/height: 控制宽度高度 . 高度和宽度一般改一个就行 , 另外一个会等比例缩放 . 否则就会图片失衡.border: 边框 , 参数是宽度的像素 . 但是一般使用 CSS 来设定 .
table 标签 : 表示整个表格tr: 表示表格的一行td: 表示一个单元格th: 表示表头单元格 . 会居中加粗thead: 表格的头部区域 ( 注意和 th 区分 , 范围是比 th 要大的 )tbody: 表格得到主体区域 .
- <tablealign="center"border="1"cellpadding="20"cellspacing="0"width="500"height="500">
- <tr>
- <td>姓名</td>
- <td>性别</td>
- <td>年龄</td>
- </tr>
- <tr>
- <td>张三</td>
- <td>男</td>
- <td>10</td>
- </tr>
- <tr>
- <td>李四</td>
- <td>女</td>
- <td>11</td>
- </tr>
- </table>
列表标签
无序列表 ul li
有序列表 ol li
自定义列表dl dt dd
- <h3>无序列表</h3>
- <ul>
- <li>咬人猫</li>
- <li>兔总裁</li>
- <li>阿叶君</li>
- </ul>
- <h3>有序列表</h3>
- <ol>
- <li>咬人猫</li>
- <li>兔总裁</li>
- <li>阿叶君</li>
- </ol>
- <h3>自定义列表</h3>
- <dl>
- <dt>我的老婆们
- </dt>
- <dd>咬人猫</dd>
- <dd>兔总裁</dd>
- <dd>阿叶君</dd>
- </dl>
input标签
- 1) 文本框
- <input type="text">
- 2) 密码框
- <input type="password">
- 3) 单选框
- <input type="radio" name="sex">男
- <input type="radio" name="sex" checked>女
- 4) 复选框
- <input type="checkbox">吃饭<input type="checkbox">睡觉 <input type="checkbox"></input type>
- 5) 普通按钮
- <input type="button" value="我是个按钮"> </inputtype>
- <select>
- <option>北京option>
- <option>上海option>
- select>
无语义标签:div&span
- <div>
- <span>咬人猫span> <span>咬人猫span> <span>咬人猫span>
- div>
- <div>
- <span>兔总裁span> <span>兔总裁span> <span>兔总裁span>
- div>
- <div>
- <span>阿叶君span> <span>阿叶君span> <span>阿叶君span>
- div>
