HTML常用标签
1. a 标签的用法
href
网址:(google.com 、 google.com 、//google.com)
路径: a/b/c or /a/b/c or ./index.html
伪协议: javascript代码; mailto:邮箱 ; tel手机号
id href=#id名
target
内置名: _blank _top _parent _self
程序员命名: windows 和 frame 的name
download
作用:下载页面,而不是作为打开页面
rel=noopener
用于解决可被恶意网站利用的安全漏洞
a标签的主要作用
跳转外部页面 跳转内部锚点 跳转到邮箱或电话等
2. img 标签的用法
alt 作为提示图片内容
height、width作为长宽的大小控制
src 索引图片来源
onload 表示成功加载图片的事件 onerror 表示图片加载失败的事件
max-width:100% 可以用于手机等多端自适应页面
3. table 标签的用法
table
如果不写thead,内容会自动归并到tbody里面
thead 放置标题
tbody 数据主体
tfoot 标注等等
tr table row
td td在tr里面
th 小表头
4. 其他感想
争取5月1日之前完成html css javescript的学习