2019.4.2 HTML相关

HTML页面的基本结构

html标签


页面的设置和文件的导入(页面标题)

要显示在页面上的标签

标签

  • h1---h6:一到六级标题
  • hr:分割线
  • br:换行
  • p:段落
  • em:斜体
  • strong:加粗

  • a 超链接
    • href 加链接
    • target="_blank"新开页面打开前面链接
  • img 图片
  • div 块标签 在实际开发中 一个页面99%都可以是div

  • table 表格 border 边框
    • tr 表格的行
    • td 表格的列
    • th 加表头
      • bgcolor 背景颜色

Emmet语法

  • 可以提升html的书写速度
    • 1.标签名+tab—— 自动补全
    • 2.table>(tr>th4)+tr5>td*4 —— 表格自动生成
  • input type = "text" 文本输入框
    • type
    • name
    • id
    • placeholder
  • input type = "password" 密码输入框
  • input type = "submit" 提交按钮
  • input type = 'reset" 重置
  • input type = "radio" 单选框
    • name="gender"只能选一
    • value = "xx" 返回值
    • checked 默认选择
  • input type = "date"选择时间
  • input type = "file" 选择文件

  • textarea 大段文本

  • label 扩大响应范围 与input绑定 两种方式
    • 给一个id然后绑定前面汉字
    • 全部包起来
  • select 下拉框
    • option 选项
  • form表单
    • action 请求地址

猜你喜欢

转载自www.cnblogs.com/lzb1234/p/10644774.html