1,页面结构分析
| 元素名 |
描述 |
|
| header* |
标题头部区域的内容(用于页面或页面中的一块区域) |
|
| footer* |
标记脚部区域的内容(用于整个页面或页面的一块区域) |
|
| section |
Web页面中的一块独立区域 |
|
| article |
独立的文章内容 |
|
| aside |
相关内容或者应用(常用于侧边栏) |
|
| nav* |
导航类辅助内容 |
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>页面结构</title></head><body><header> <h3>网页头部</h3></header><section> <h3>网页主体</h3></section><footer> <h3>网页底部</h3></footer></body></html>
2,内联框架iframe
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>内联框架</title></head><body><!-- 示例:--><!--<iframe src="//player.bilibili.com/player.html?aid=55631961&bvid=BV1x4411V75C&cid=97257967&page=11" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"></iframe>--><!-- iframe 内联框架src:地址w-h:宽度,高度--><!-- 使用方式:1,iframe src 直接打开2,a 标签点击打开--><iframe src="" name="baidu" frameborder="0" width="1000px" height="800px"></iframe><!--<a href="1,我的第一个网页.html" target="baidu">点我跳转</a>--><a href="https://www.baidu.com" target="baidu">点我跳转</a></body></html>
3,表单的Get 与 Post 请求
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>登录注册</title></head><body><h1>注册</h1><!-- 表单 form action:表单提交的位置,可以是网站,也可以是一个请求地址 method:post,get 提交方式 get:提交信息会在链接上看到,不安全,但高效,不能传输数据量大的信息或者文件 post:比较安全,能传输大文件 --><form action="xxx.html" method="post"> <!-- 文本输入框,input type='text' --> <p>名字:<input type="text" name="username"></p> <!-- 密码输入框,input type='password' --> <p>密码:<input type="password" name="pwd"></p> <p> <input type="submit" name="subBtn" value="提交" /> <input type="reset" name="resBtn" value="重填"> </p></form></body></html>
4,表单元素格式
| 属性 |
说明 |
|
| type |
指定元素的类型。text,password,checkbox,radio,submit,reset,file,hidden,image和button,默认为text |
|
| name |
指定表单元素的名称 |
|
| value |
元素的初始值。type为radio时必须指定一个值 |
|
| size |
指定表单元素的初始宽度。当 type 为 text 或 password时,表单元素的大小以字符为单位。对于其他类型,宽度以像素为单位 |
|
| maxlength |
type为 text 或 password 时,输入的最大字符数 |
|
| checked |
type为 radio 或 checkbox 时,指定按钮是否是被选中 |
5,单选框,多选框,按钮,下拉框,文本域,文件域
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>登录注册</title></head><body><h1>注册</h1><!-- 表单 form action:表单提交的位置,可以是网站,也可以是一个请求地址 method:post,get 提交方式 get:提交信息会在链接上看到,不安全,但高效,不能传输数据量大的信息或者文件 post:比较安全,能传输大文件 --><form action="xxx.html" method="get"> <!-- 表单元素格式 --> <!-- 文本输入框,input type='text' value="小派参见" 默认初始值 maxlength="8" 最长能写几个字符 size="30" 文本框的长度 --> <p>名字:<input type="text" name="username"></p> <!-- 密码输入框,input type='password' --> <p>密码:<input type="password" name="pwd"></p> <!-- 单选框标签 input type='radio' value:单选框的值 name:表示组 --> <p>性别: <input type="radio" value="boy" name="sex" checked />男 <input type="radio" value="girl" name="sex" />女 </p> <!-- 多选框 input type="checkbox" --> <p>爱好: <input type="checkbox" value="sleep" name="hobby" />睡觉 <input type="checkbox" value="code" name="hobby" />敲代码 <input type="checkbox" value="chat" name="hobby" />聊天 <input type="checkbox" value="game" name="hobby" />游戏 </p> <!-- 按钮 input type="button" 普通按钮 input type="image" 图像按钮,可提交表单 input type="button" 提交按钮 input type="button" 重置 --> <p>按钮: <input type="button" name="btn1" value="点击变长" /> <!--<input type="image" name="img1" src="../image/1.png" width="100" height="100" />--> </p> <!-- 下拉框,列表框 --> <p>国家: <select name="country" id="country"> <option value="china">中国</option> <option value="us">美国</option> <option value="usa">英国</option> <option value="intant" selected>印度</option> </select> </p> <!-- 文本域 clos:50 列[宽] rows:10 行[高] --> <p>反馈: <textarea name="suggestions" cols="50" rows="10">文本内容</textarea> </p> <!-- 文件域 input type="file" name="files" --> <p>文件域: <input type="file" name="files"> <input type="button" name="upload" value="上传"> </p> <p> <input type="submit" name="subBtn" value="提交"/> <input type="reset" name="resBtn" value="重填"> </p></form></body></html>
6,https://www.bilibili.com/video/BV1x4411V75C?p=16