Html常用标签

作者: 招投标秘籍 | 来源:发表于2020-12-29 00:21 被阅读0次

    今天我们来简单介绍一下HTML常见的标签,开启HTML的大门

    a 标签的用法

    a标签的作用

    1. 跳转到外部页面
    2. 跳转到内部锚点(#xxx)
    3. 跳转到邮箱或电话

    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(本页)


    image.png

    table标签

    table标签=>表格

    1. 有三个标签
    • <thead></thead>→<tr></tr> table row(表格里面一行)→<th></th>
    • <tbody><tbody>→<tr></tr>=><td>(ltd>
    • <tfoot><tfoot>→<tr></tr>=><td></td>
      (顺序可以互换)
    1. 相关的样式
    • table-layouit:fixed /outo(区别:tixed 根据内容平均outo 根括内容预测)
    • border-Collapse 合并(间距)
      hrorder-collapse:collapse.;
    • horder-spacing (距离)
      moder-spacing:oxp;


      image.png

    img标签

    1. 作用:发出get请求,展示一张图片
    2. 属性alt/height /width|/src
    • at图片加载失败,有代替的文字
    • height width 高和宽(只没置一种,不让图片变形)
    • src图片地址
    1. 事件
      enload(成功时用) onerror(错误时用)
    2. 响应式
      max-width:100%(手机成功能被流览)


      image.png

    相关文章

      网友评论

        本文标题:Html常用标签

        本文链接:https://www.haomeiwen.com/subject/heyxoktx.html