HTML5
1、基本认识
HTML:Hyper Text Markup Language(超文本标记语言) W3C:World Wide Web Consortium(万维网联盟)
结构化标准语言(HTML、XML) 表现标准语言(CSS) 行为标准(DOM、ECMAScript)
2、网页的基本信息
<!DOCTYPE html>
< html lang = " en" >
< head>
< meta charset = " UTF-8" >
< meta name = " keywords" content = " Feild学HTML" >
< meta name = " description" content = " 认真学习,做好网站" >
< title> 我的第一个网页</ title>
</ head>
< body>
I'm comming!
</ body>
</ html>
3、网页的基本标签
<!DOCTYPE html>
< html lang = " en" >
< head>
< meta charset = " UTF-8" >
< title> 基本标签学习</ title>
</ head>
< body>
< h1> 一级标签</ h1>
< h2> 二级标签</ h2>
< h3> 三级标签</ h3>
< h4> 四级标签</ h4>
< h5> 五级标签</ h5>
< h6> 六级标签</ h6>
< p> 不要温顺的走进那个良夜,</ p>
< p> 激情不能被消沉的暮色淹没,</ p>
< p> 咆哮吧,咆哮,痛斥那光的退缩。</ p>
< p> 智者在临终的时候,对黑暗妥协,</ p>
< p> 是因为它们的语言已黯然失色,</ p>
< p> 它们不想被夜色迷惑,</ p>
< p> 咆哮吧,咆哮,痛斥那光的退缩。</ p>
< hr/>
不要温顺的走进那个良夜,< br/>
激情不能被消沉的暮色淹没,< br>
咆哮吧,咆哮,痛斥那光的退缩。< br/>
智者在临终的时候,对黑暗妥协,< br/>
是因为它们的语言已黯然失色,< br/>
它们不想被夜色迷惑,< br/>
咆哮吧,咆哮,痛斥那光的退缩。< br/>
< hr/>
< p> 粗体:< strong> wisdex</ strong> </ p>
< p> 斜体:< em> Feild</ em> </ p>
< hr/>
空 格
空 格 < br/>
>
< < br/>
© 版权所有Feild
</ body>
</ html>
4、图像标签
<!DOCTYPE html>
< html lang = " en" >
< head>
< meta charset = " UTF-8" >
< title> 图像标签学习</ title>
</ head>
< body>
< img src = " ../resoures/image/cn.png" alt = " 网站logo"
title = " 悬停文字:欢迎你!" width = " 200" height = " 200" >
< img src = " " alt = " " >
</ body>
</ html>
5、链接标签
<!DOCTYPE html>
< html lang = " en" >
< head>
< meta charset = " UTF-8" >
< title> 链接标签学习</ title>
</ head>
< body>
< a name = " top" > 顶部</ a>
< a href = " 1、我的第一个网页.html" target = " _blank" > 点击跳转到页面1</ a> < br/>
< a href = " https://www.baidu.com" target = " _self" > 点击跳转到百度</ a> < br/>
< a href = " 1、我的第一个网页.html" >
< img src = " ../resoures/image/cn.png" alt = " 网站logo"
title = " 悬停文字:欢迎你!" width = " 200" height = " 200" >
</ a> < br/>
< a href = " #top" > 回到顶部</ a>
< a href = " mailto:feild@wisdex.cn" > 联系我</ a>
</ body>
</ html>
6、列表标签
<!DOCTYPE html>
< html lang = " en" >
< head>
< meta charset = " UTF-8" >
< title> 列表标签学习</ title>
</ head>
< body>
< ol>
< li> java</ li>
< li> html</ li>
< li> css</ li>
< li> vue</ li>
</ ol>
< ul>
< li> 顺序结构</ li>
< li> 选择结构</ li>
< li> 循环结构</ li>
</ ul>
< dl>
< dt> 语言</ dt>
< dd> Java</ dd>
< dd> Linux</ dd>
< dd> Python</ dd>
< dd> Go</ dd>
< dt> 小工具</ dt>
< dd> Swagger</ dd>
< dd> Json</ dd>
< dd> Ajax</ dd>
</ dl>
</ body>
</ html>
7、表格标签
<!DOCTYPE html>
< html lang = " en" >
< head>
< meta charset = " UTF-8" >
< title> 表格标签学习</ title>
</ head>
< body>
< table border = " 1px" >
< tr>
< td colspan = " 3" > 11</ td>
< td> 14</ td>
</ tr>
< tr>
< td rowspan = " 2" > 21</ td>
< td> 22</ td>
< td> 23</ td>
< td> 24</ td>
</ tr>
< tr>
< td> 32</ td>
< td> 33</ td>
< td> 34</ td>
</ tr>
</ table>
</ body>
</ html>
8、媒体元素
<!DOCTYPE html>
< html lang = " en" >
< head>
< meta charset = " UTF-8" >
< title> 媒体元素学习</ title>
</ head>
< body>
< video src = " ..//resoures/video/video.MP4"
controls autoplay width = " 1000" height = " 500" > </ video>
</ body>
</ html>
9、页面结构
<!DOCTYPE html>
< html lang = " en" >
< head>
< meta charset = " UTF-8" >
< title> 页面结构分析</ title>
</ head>
< body>
< header>
< h2> 网页头部</ h2>
</ header>
< section>
< h2> 网页主体</ h2>
< article>
< h3> 文章内容</ h3>
</ article>
< aside>
< ol>
< li> java</ li>
< li> python</ li>
< li> go</ li>
< li> c++</ li>
</ ol>
< nav>
dadf
</ nav>
</ aside>
</ section>
< footer>
< h2> 网页脚部</ h2>
</ footer>
</ body>
</ html>
10、ifame内联框架
<!DOCTYPE html>
< html lang = " en" >
< head>
< meta charset = " UTF-8" >
< title> iframe内联框架学习</ title>
</ head>
< body>
< iframe frameborder = " 0" height = " 200px"
src = " https://wisdex.cn" width = " 200px" > </ iframe>
< iframe src = " " frameborder = " 0" name = " hello" > </ iframe>
< a href = " https://wisdex.cn" target = " hello"
height = " 200px" width = " 200px" > 点击跳转</ a>
</ body>
</ html>
11、表单语法
<!DOCTYPE html>
< html lang = " en" >
< head>
< meta charset = " UTF-8" >
< title> 表单学习</ title>
</ head>
< body>
< h1> 注册</ h1>
< form action = " 7、媒体元素.html" method = " get" >
< p> 名字:< input type = " text" name = " username" value = " 值得信" maxlength = " 8" size = " 30" > </ p>
< p> 密码:< input type = " password" name = " pwd" > </ p>
< p>
< input type = " radio" value = " boy" name = " sex" > 男
< input type = " radio" value = " girl" name = " sex" > 女
</ p>
< p>
< input type = " checkbox" value = " read" name = " hobby" > 看书
< input type = " checkbox" value = " sports" name = " hobby" checked > 运动
< input type = " checkbox" value = " chat" name = " hobby" > 聊天
< input type = " checkbox" value = " eat" name = " hobby" > 美食
< input type = " checkbox" value = " code" name = " hobby" > 编程
</ p>
< p>
< input type = " image" src = " ../resoures/image/cn.png" >
</ p>
< hr>
< p>
< input type = " file" name = " files" >
< input type = " button" name = " upload" value = " 上传" >
</ p>
< p>
邮箱:
< input type = " email" name = " email" >
</ p>
< p>
URL:
< input type = " url" name = " url" >
</ p>
< p>
商品数量:
< input type = " number" name = " num" max = " 100" min = " 0" step = " 1" >
</ p>
< p>
音量:
< input type = " range" name = " volume" min = " 0" max = " 100" step = " 2" >
</ p>
< p>
搜索:
< input type = " search" name = " search" >
</ p>
< hr>
< p> 应聘岗位
< select name = " jobs" id = " " >
< option value = " marketing" > 市场</ option>
< option value = " sales" > 销售</ option>
< option value = " project" selected > 实施</ option>
< option value = " hr" > 人力</ option>
< option value = " financial" > 财务</ option>
</ select>
</ p>
< p>
< textarea name = " textarea" cols = " 50" rows = " 10" id = " mark" > 个人补充</ textarea>
</ p>
< p>
< input type = " submit" value = " 提交" >
< input type = " reset" value = " 清空表单" >
</ p>
for:指向制定的位置高亮--> 在id中找对应的
< p>
< label for = " mark" > 有什么说的,进来写点?</ label>
</ p>
< p> 姓名:
< input type = " text" placeholder = " 请输入姓名" >
</ p>
< p> 密码:
</ p>
< p> 邮箱:
< input type = " email" placeholder = " 请输入邮箱" pattern = " ^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$" >
</ p>
</ form>
</ body>
</ html>