今天我们来简单介绍一下HTML常见的标签,开启HTML的大门
a 标签的用法
a标签的作用
- 跳转到外部页面
- 跳转到内部锚点(#xxx)
- 跳转到邮箱或电话
a的属性(href取值)
- 网址
https://baidu·com
http: //baidu.com
//baidu.com(无协议的网址) - 路径
a/b/以及a/b/c
index.html以及/index·html - 伪协议
javascipt:代码;→(javascript:;→表示不产生任何变化)
mailto:邮箱
tel:手机号 -
mid
href=#xxx
image.png
a的属性(target取值)
_blank(空白页打升)
_top(顶部,需iframe)
_parent(上级)
_self(本页)
![](https://img.haomeiwen.com/i25394908/6348641aadefc024.png)
table标签
table标签=>表格
- 有三个标签
- <thead></thead>→<tr></tr> table row(表格里面一行)→<th></th>
- <tbody><tbody>→<tr></tr>=><td>(ltd>
- <tfoot><tfoot>→<tr></tr>=><td></td>
(顺序可以互换)
- 相关的样式
- table-layouit:fixed /outo(区别:tixed 根据内容平均outo 根括内容预测)
- border-Collapse 合并(间距)
hrorder-collapse:collapse.; -
horder-spacing (距离)
moder-spacing:oxp;
image.png
img标签
- 作用:发出get请求,展示一张图片
- 属性alt/height /width|/src
- at图片加载失败,有代替的文字
- height width 高和宽(只没置一种,不让图片变形)
- src图片地址
- 事件
enload(成功时用) onerror(错误时用) -
响应式
max-width:100%(手机成功能被流览)
image.png
网友评论