7.17.2019
XHTML
1.XHTML and HTML difference:
XHTML elements must be properly nested.
XHTML elements must be closed.
Label names must be lowercase.
XHTML documents must have a root element. (All XHTML elements must be nested within the <html> root element. All the remaining elements of sub-elements can have child elements must be nested in pairs and in the parent element)
2. syntax rules:
- Attribute names must be lowercase
- Attribute values must be quoted
- Property can not be abbreviated
- Id attribute by attribute name instead of
- XHTML DTD defines mandatory use of HTML elements
3.XHTML three document types:
- STRICT (strictly typed)
(Need to clean and marked to avoid confusion on performance. Please conjunction with Cascading Style Sheets.)
- TRANSITIONAL (transition type)
(When you need to use HTML attributes in the performance, and when it is necessary to write XHTML for those who do not support Cascading Style Sheets browser.)
- FRAMESET (Frame Type)
(Required HTML browser window frame divided into two or more frame time.)
4.XHTML validation: XHTML document is validated according to the document type declaration (DTD). Only the correct DTD file is added to the first line, XHTML documents will be properly verified.
Strict DTD includes not against the use of or do not appear in the frame structure of elements and attributes;
Transitional DTD includes everything in the strict DTD plus deprecated elements and attributes those of;
DTD framework includes everything in the transitional DTD plus frames.
5.XHTML modules:
Module Name |
description |
Applet Module (Applet module) |
Definition has been abandoned applet element. |
Base Module (basic module) |
Define the basic elements. |
Basic Forms Module (basic module of the form) |
Define the basic elements of the form (forms). |
Basic Tables Module (basic spreadsheet module) |
Define the basic elements of the table (table). |
Bi-directional Text Module (bi-directional text block) |
Defined bdo element. |
Client Image Map Module (client-side image mapping module) |
Defined browser image map element (image map elements). |
Edit Module (editing module) |
Edit and delete the definition of the elements inserted. |
Forms Module (Module form) |
Define all the elements used in the form. |
Frames Module (frame module) |
Defined frameset element. |
Hypertext Module (hypertext module) |
The definition of a element. |
Iframe Module (inline frame module) |
Define iframe element. |
Image Module (image module) |
Element defining an image (img). |
Intrinsic Events Module () |
Defined event attributes (event), such as onblur and onchange. |
Legacy Module (legacy module) |
Abandoned defined elements and attributes. |
Link Module (link module) |
Custom links (link) elements. |
List Module (list of modules) |
Definition list elements ol, li, ul, dd, dt, and dl. |
Metainformation Module (meta-information module) |
Defined meta element. |
Name Identification Module (SIM name) |
Definition has been abandoned name attribute. |
Object Module (Object Module) |
Element definition object (object) and a param element. |
Presentation Module (performance module) |
And defines the performance of elements such as b i. |
Scripting Module (script module) |
Defined script (script) and no script (noscript) elements. |
Server Image Map Module (server-side image mapping module) |
Server-side image map is defined (server side image map) element |
Structure Module (Module Structure) |
Elements define the following: html, head, title and body. |
Style Attribute Module (style attributes module) |
Define style attributes. |
Style Sheet Module (stylesheet module) |
Defined style elements. |
Tables Module (spreadsheet module) |
It defines the elements in the table. |
Target Module (Target模块) |
Define the target properties. |
Text Module (text block) |
Custom text container element (text container), such as p and h1. |
6.XHTML properties:
Core:
Following tags do not provide the following properties: base, head, html, meta, param, script, style, and title element.
Attributes |
value |
description |
class |
class_rule 或 style_rule |
Element type (class) |
id |
id_name |
Id of a particular element |
style |
Style definitions |
Inline style definitions |
title |
Prompt text |
Tooltip displayed in the text |
Language:
Following tags do not provide the following properties: base, br, frame, frameset, hr, iframe, param, and script element.
Attributes |
value |
description |
to you |
l | rtl |
Set the text direction |
only |
Language code |
Setting the language code |
keyboard:
Attributes |
value |
description |
accesskey |
character |
Set access an element of keyboard shortcuts |
tabindex |
number |
Setting an element of the Tab Order |
7.XHTML Event Properties:
window events (Window Events):
Only valid in body and frameset elements.
Attributes |
value |
description |
onload |
script |
Execute scripts when a document is loaded |
onunload |
script |
Execute scripts when a document has been removed |
Form elements event (Form Element Events)
Only valid in form elements.
Attributes |
value |
description |
onchange |
script |
Execute scripts when the element changes |
onsubmit |
script |
Execution of the script when the form is submitted |
onreset |
script |
Execution of the script when the form is reset |
onselect |
script |
Execute scripts when the element is selected |
onblur |
script |
Execute scripts when the element loses focus |
onfocus |
script |
Execute scripts when the element gets focus |
Keyboard events (Keyboard Events)
Not valid in the following elements: base, bdo, br, frame, frameset, head, html, iframe, meta, param, script, style, and title elements.
Attributes |
value |
description |
onkeydown |
script |
Execution of the script when the keyboard is pressed |
onkeypress |
脚本 |
当键盘被按下后又松开时执行脚本 |
onkeyup |
脚本 |
当键盘被松开时执行脚本 |
鼠标事件 (Mouse Events)
在下列元素中无效:base, bdo, br, frame, frameset, head, html, iframe, meta, param, script, style, title 元素。
属性 |
值 |
描述 |
onclick |
脚本 |
当鼠标被单击时执行脚本 |
ondblclick |
脚本 |
当鼠标被双击时执行脚本 |
onmousedown |
脚本 |
当鼠标按钮被按下时执行脚本 |
onmousemove |
脚本 |
当鼠标指针移动时执行脚本 |
onmouseout |
脚本 |
当鼠标指针移出某元素时执行脚本 |
onmouseover |
脚本 |
当鼠标指针悬停于某元素之上时执行脚本 |
onmouseup |
脚本 |
当鼠标按钮被松开时执行脚本 |
复习,准备开始CSS的学习