In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article shares with you the content of the sample analysis of the XHTM module. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
XHTML is a standard recommended by W3C, which defines a version of HTML that is compatible with XML. The XHTML document is a valid XML document, so it is written in a stricter format than HTML. XHTML is a standard recommended by W3C, which defines a version of HTML that is compatible with XML. The XHTML document is a valid XML document, so compile
XHTML is a standard recommended by W3C, which defines a version of HTML that is compatible with XML. The XHTML document is a valid XML document, so it is written in a stricter format than HTML.
XHTML is a standard recommended by W3C, which defines a version of HTML that is compatible with XML. The XHTML document is a valid XML document, so it is written in a stricter format than HTML. If you need to convert an HTML document to an XHTML document, you need to make the following changes:
The closing tag is not allowed to be omitted in XHTML, so you need to make up for the missing tags.
Elements need to be nested in the correct order.
The names of all elements and attributes are lowercase.
Attribute values need to be in quotation marks, such as.
All attributes need to have property values.
Use & and.
The document should be encoded in UTF-8 or UTF-16, or an XML declaration should be added to specify how the document is encoded.
Non-standard elements need to be removed. Such as: marguee.
Add a DOCTYPE declaration to point to one of the three DTD of XHTML with PUBLIC. They are Strict, Transitional, and Frameset, and Strict is generally used.
Strict (strict type), the XHTML form recommended by W3C. Some non-standard elements and attributes, such as applet and center, are not included. The statement is as follows:
Transitional (transitional), a less strict XHTML format, can use some non-standard elements and attributes, such as applet and bgcolor. The statement is as follows:
Frameset (framework), similar to transitional DTD, allows the use of framework-related elements such as frameset and iframe. The statement is as follows:
The root element of the document must have a xmlns attribute that identifies the default namespace named http://www.php.cn/.
The following is an example of a standard XHTML document:
Moving from HTML to XHTML is a boring and tedious task, and now there is an open source tool called tidy that can help us do most of the work. It is a C program that can be used as follows:
Xhtml example...
% tidy-- output-xhtml yes test.html test.xml
XHTML 1.1 divides the three DTD of XHTML into independent modules. We can include or omit some modules according to the actual situation.
Structure Module (structural module)->% xhtml-struct.module;, contains the main elements of the HTML document, such as html, head, title, and body.
Text Module (text module)->% xhtml-text.module;, contains the basic elements of the text and its inline elements, such as H2, h3,..., strong, span, and so on.
Hypertext Module (hyperlink module)->% xhtml-hypertext.module;, contains elements for links, such as: an element.
List Module (list module)-- >% xhtml-list.module;, contains elements for lists, such as dl, dt, dd, ul, ol, and li.
Applet Module (applet module)-> elements required by% xhtml-applet.module;,Java, such as applet and param.
Presentation Module (presentation module)->% xhtml-pres.module;, presentation-oriented tags: B, big, hr, I, small, sub, sup, and tt.
Edit Module (editing module)->% xhtml-edit.module;, is used for fixed elements, such as del and ins.
Bidirectional Text Module (text orientation module)->% xhtml-bdo.module;, is used to specify the direction of text reading, such as the bdo element.
Basic Forms Module (basic form module)->% xhtml-basic-form.module;, is used for form elements of HTML 3.2, such as form, input, select, option, and textarea.
Forms Module (form module)->% xhtml-form.module;, is used for form elements of HTML 4.0, such as: form, input, select, option, textarea, button, fieldset, label, legend and optgroup.
Basic Tables Module (basic Table Module)->% xhtml-basic-table.module;, basic table elements, such as table, caption, th, tr and td.
Table Module (Table Module)->% table support for xhtml-table.module;, security features, such as table, caption, th, tr, td, col, colgroup, tbody, thead and tfoot.
Image Module (image module)->% xhtml-image.module;, contains img elements.
Client-side Image Map Module (client-side image image module)->% xhtml-csismap.module;, contains map and area elements and attributes of elements needed to support client-side image images.
Server-side-Image Map Module (server-side image mapping module)-- >% xhtml-ssismap.module;, this module does not add a new element, but adds an ismap attribute to the img element.
Object Module (object module)->% xhtml-object.module;, is used to embed executable content in web pages, such as java programs.
Param Module (Parameter Module)-> the param element that passes parameters in the executable content of the xhtml-param.module;, web page.
Frames Module (framework module)->% xhtml-frames.module;, contains elements needed to implement the framework, such as frame, frameset, and noframes.
Iframe Module (inline framework module)->% xhtml-iframe.module;, contains the iframe element of the inline framework.
Intrinsic Events (inherent event module)->% xhtml-events.module;, supports attributes of scripts such as onSubmit and onFocus.
Meta-information Module (meta information module)->% xhtml-meta.module;, contains meta elements.
Scripting Module (script module)->% xhtml-script.module;, supports scripts such as JavaScript.
Stylesheet Module (stylesheet module)->% xhtml-style.module;, is used to define the style element of CSS.
Link Module (Link Module)-- >% xhtml-link.module;, specifies link elements for external files, such as style sheets, libraries, and so on.
Base Modue (base module)->% xhtml-base.module;, contains the base element that specifies the base URL referenced by the relative URL.
Target Module (target module)->% xhtml-target.module;, is used to specify the target property of the target frame or a window in the frame.
Style Attribute Module (style attribute module)->% xhtml-inlstyle.module;, applies the CSS style to the style attribute of a single element in the document.
Name Identification Module (name identification module)->% xhtml-nameident.module;,name attribute is an earlier version of the id attribute and is not recommended now.
Legacy Module (legacy module)->% xhtml-legacy.module;, deprecated elements and attributes, such as: basefont, center, fonts, strike, and u elements.
Ruby Module (Ruby module)->% xhtml-ruby.module;, East Asian text ruby, rbc, rtc, rb, rt and rp elements used to place a small amount of text next to the body text, generally used to indicate pronunciation.
Thank you for reading! This is the end of this article on "sample Analysis of XHTM Module". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.