这篇文章主要介绍了关于HTML5 常用语法一览,有着一定的参考价值,现在分享给大家,有需要的朋友可以参考一下
HTML 5 常用语法一览(列举不支持的属性)
HTML头部标记
标记 | 描述 | HTML5标准 |
定义页面中所有链接的基准URL | ||
设定显示在浏览器左上方的标题内容 | ||
表明该文档是一个可用于检索的网关脚本 | 不支持 | |
文档本身的元信息,例如查询关键词,有效期等 | ||
设定CSS层叠样式表内容 | ||
设定外部资源的链接 | ||
页面脚本内容 |
元信息标记属性
标记 | 描述 | 值 | HTML5标准 |
http-equiv | 生成一个HTTP标准域,把Content属性关联到HTTP头部 |
content-type / expires / refresh / set-cookie |
|
name | 把content属性关联到一个名称 |
author / description / keywords / generator /revised /others |
|
content | 定义与http-equiv 或 name属性相关的元信息 关键字/值内容 | ||
charset | 文档的字符编码 | 新增属性 |
注:HTML5中不支持scheme属性,新增charset属性,具体查看:HTML5 标签
HTML 主体标记属性
属性 | 描述 | HTML5标准 |
text | 设定页面文字颜色 | 删除 |
bgcolor | 设定页面背景颜色 | 删除 |
background | 设定页面背景图像 | 删除 |
bgproperties | 设定页面的背景图像为固定,不随页面的滚动而滚动 | 删除 |
link | 设定页面默认的链接颜色 | 删除 |
alink | 设定鼠标正在单击时候的链接颜色 | 删除 |
vlink | 设定访问过后的链接颜色 | 删除 |
topmargin | 设定页面的上边距 | 删除 |
leftmargin | 设定页面的左边距 | 删除 |
注: 在 HTML 5 中,删除了所有
的特殊属性。具体查看:HTML5 标签
特殊符号
特殊符号 | 符号码 |
" | " |
& | & |
< | < |
> | > |
© | © |
® | ® |
± | ± |
× | × |
§ | § |
¢ | ¢ |
¥ | ¥ |
· | · |
€ | |
£ | £ |
™ | ™ |
标题字标记
标记 | 描述 |
..... |
一级标题 |
..... |
二级标题 |
..... |
三级标题 |
..... |
四级标题 |
..... |
五级标题 |
..... |
六级标题 |
Note: See specifically the HTML5
In HTML 4.01, the "align" attribute of h1 - h6 elements is deprecated.
In HTML 5, the "align" attribute of h1 - h6 elements is not supported.
Text modification tags
Description | HTML5Standard | |
Bold | ||
bold | ||
## |
||
## | italic||
# |
superscript |
|
subscript |
||
## | Large font size | Not supported|
## | Small font size | Not supported |
Underscore | Not supported | |
Strikethrough | Not supported | |
Strikethrough | Not supported | |
Address | ||
# | Typewriter text | Not supported |
face
Fontsize | Font size | |
##color | Color | Not supported |
Note: Please see the HTML 5 tag | ||
In HTML 5, this element is not supported, but insertion by WYSIWYG editors is allowed. | In HTML 5, only the style attribute is supported. |
Unordered list
#Ordered list | | |
# |
Directory list | No Support |
Definition list | ||
Define the tags of the list | ||
The tags of the list items | ||
Hyperlink tag | ||
Description | HTML5 Standard |
name
Name an anchor, not supported, use id instead | title | |
target |
||
Attribute value |
Description |
|
_parent | opens in the previous window. Generally, when using frame pages, |
_top | |
##Image tag attribute | |
Attributes | |
HTML5 Standard |
alt
width, height | |||||||||||||||||||||||||||||||||||||||||
##border | Border|||||||||||||||||||||||||||||||||||||||||
vspace |
Vertical spacing |
||||||||||||||||||||||||||||||||||||||||
hspace | Horizontal spacing | Not supported||||||||||||||||||||||||||||||||||||||||
align | Arrangement | Not supported | |||||||||||||||||||||||||||||||||||||||
Attribute value | Description | HTML5 standard |
top | The middle line of the text is above the picture | |
middle | The middle line of the text is in the middle of the picture | |
bottom | The middle line of the text is at the bottom of the picture | |
left | The picture is on the left side of the text | |
right | The picture is on the right side of the text | |
absbottom | The bottom line of the text is at the bottom of the picture | |
absmiddle | The bottom line of the text is in the middle of the picture | |
baseline | The baseline alignment of English text | |
texttop | Align the top edge of English text |
Table tag
Description |
does not support any attributes of the
tag "colspan" and "rowspan" attributes.
Form tag |
---|
The above is the detailed content of List of common HTML5 syntax. For more information, please follow other related articles on the PHP Chinese website!