一、HTML标签简写及全称大全
HTML标签 英文全称 中文释义 a Anchor 锚 abbr Abbreviation 缩写词 acronym Acronym 取首字母的缩写词 address Address 地址 alt alter 替用(一般是图片显示不出的提示) b Bold 粗体(文本) bdo Direction of Text Display 文本显示方向 big Big 变大(文本) blockquote Block Quotation 区块引用语 br Break 换行 cell cell 巢 cellpadding cellpadding 巢补白 cellspacing cellspacing 巢空间 center Centered 居中(文本) cite Citation 引用 code Code 源代码(文本) dd Definition Description 定义描述 del Deleted 删除(的文本) dfn Defines a Definition Term 定义定义条目 div Division 分隔 dl Definition List 定义列表 dt Definition Term 定义术语 em Emphasized 加重(文本) font Font 字体 h1~h6 Header 1 to Header 6 标题1到标题6 hr Horizontal Rule 水平尺 href hypertext reference 超文本引用 i Italic 斜体(文本) iframe Inline frame 定义内联框架 ins Inserted 插入(的文本) kbd Keyboard 键盘(文本) li List Item 列表项目 nl navigation lists 导航列表 ol Ordered List 排序列表 optgroup Option group 定义选项组 p Paragraph 段落 pre Preformatted 预定义格式(文本 ) q Quotation 引用语 rel Reload 加载 s/ strike Strikethrough 删除线 samp Sample 示例(文本 small Small 变小(文本) span Span 范围 src Source 源文件链接 strong Strong 加重(文本) sub Subscripted 下标(文本) sup Superscripted 上标(文本) td table data cell 表格中的一个单元格 th table header cell 表格中的表头 tr table row 表格中的一行 tt Teletype 打印机(文本) u Underlined 下划线(文本) ul Unordered List 不排序列表 var Variable 变量(文本)
标签参考手册:https://www.w3school.com.cn/tags/index.asp
二、html特殊字符对照表
字符 描述 转义字符 " 引号 & quot; & 与 & amp; < 小于 & lt; > 大于 & gt; 空格 & nbsp; ° 摄氏度 & deg; × 乘号 & times ÷ 除号 & divide; ² 平方2(上标) & sup2; ³ 立方3(上标) & sup3;
注:&与字母间没有空格
三、标签属性
1、全局属性 适用于所有html元素: https://www.w3school.com.cn/tags/html_ref_standardattributes.asp 2、<img / >标签
属性 属性值 描述 src url 图片路径 alt 文本 图片无法显示的替换文本 title 文本 鼠标悬停时显示的内容 weight/height 像素 设置图像大小 border 数字 图像边框宽度
四、文本属性
属性 值 备注 font-style normal/italic font-weight 100~900,normal400,bold700 字体粗细,整百数 font-size 像素值 line-height 像素值 行高=盒子高时垂直居中 font-family “字体名” 全英文名称且中间没有特殊符号可不加引号 color 预定义色/十六进制/rgb代码 text-align center/right/left text-indent 2em 首行缩进1em=1个字 text-decoration none/underline 多用于去掉链接文字的下划线
五、盒子属性
属性 值 备注 display block/inline/inline-block 呈现方式 weight/height 像素值 针对block和inline-block background-color 同文本 backgroud-image url(图片路径) 路劲不带引号 background-repeat repeat(默认)/no-repeat/repeat-x/repeat-y 平铺方式 background-attachment scroll(默认)/fixed 背景附着 background-position x坐标 y坐标 方位名字/像素值/百分比 background rgba(x,x,x,x) 最后一位是透明度 margin-top/left/right/bottom 像素值 盒子外边距