search
HomeWeb Front-endHTML TutorialSummary of DTD usage in html_html/css_WEB-ITnose

DTD is a set of grammatical rules for tags. It is part of the XML1.0 version specification, is the verification mechanism of html files, and is part of the composition of html files.

DTD: Three document types: S (Strict), T (Transitional), F (Frameset).
Strict: Use this type if you need clean markup without clutter in the presentation layer. Please use with Cascading Style Sheets (CSS)
Transitional: DTD can contain rendering attributes and elements that the W3C expects to be moved into the style sheet. Use
Frameset if your readers are using browsers that don't support Cascading Style Sheets (CSS) and you have to use HTML's rendering features: DTD should be used for documents with frames. Except that the frameset element replaces the body element, Frameset DTD is equivalent to Transitional DTD

html5 basically does not have the strict requirements of XHTML 1.0 Transitional, and simplifies many things and can be used directly

HTML5

??????????????????????????????
xhtml 1.1:

xhtml 1.1 plus mathml plus svg:

??????????????????????????????
html 4.01 strict:

html 4.01 transitional:

html 4.01 frameset:

?????? ????????????????????????
xhtml 1.0 strict:

xhtml 1.0 transitional:

xhtml 1.0 frameset:

??????????????? ??????????????????
html 3.2:

?? ??????????????????????????????
html 2 (the number 2 represents the version number):


Attached is an old version tag comparison DTD document:

标签

描述

DTD

 

定义文档类型。

STF

定义 HTML 文档。

STF

定义文档的主体。

STF

to

定义 HTML 标题。

STF

定义段落。

STF


定义简单的折行。

STF


定义水平线。

STF

定义注释。

STF

Tag
Description DTD td>
Define the document type. STF
Define HTML document. STF
Define the body of the document. STF

to

Define HTML title. STF

Define paragraphs. STF

Define simple line breaks. STF

Define horizontal lines. STF
Define comments. STF

Define bold text.

标签

描述

DTD

定义粗体文本。

STF

不赞成使用。定义文本的字体、尺寸和颜色

TF

定义斜体文本。

STF

定义强调文本。

STF

定义大号文本。

STF

定义语气更为强烈的强调文本。

STF

定义小号文本。

STF

定义上标文本。

STF

定义下标文本。

STF

定义文本的方向。

STF

不赞成使用。定义下划线文本。

TF

Tag

Description

标签

描述

DTD

 

定义预格式文本

STF

定义计算机代码文本。

STF

定义打字机文本。

STF

定义键盘文本。

STF

定义文本的变量部分。

STF

定义定义项目。

STF

定义计算机代码样本。

STF

不赞成使用。定义预格式文本。

 

DTD

标签

描述

DTD

定义只取首字母的缩写。

STF

定义缩写。

STF

定义文档作者或拥有者的联系信息。

STF

定义块引用。

STF

不赞成使用。定义居中文本。

TF

定义短的引用。

STF

定义引用(citation)。

STF

定义被插入文本。

STF

定义被删除文本。

STF

不赞成使用。定义加删除线的文本。

TF

不赞成使用。定义加删除线的文本。

TF

STF
Deprecated. Define text font, size and color TF
Define italic text. STF
Define emphasis text. STF
Define large text. STF
Define a stronger tone of emphasis for the text. STF
Define small text. STF
Define superscript text. STF
Define subscript text. STF
Define the direction of the text. STF
Deprecated. Defines underlined text. TF
Tags Description DTD
 
Define preformatted text STF
Define computer code text. STF
Define typewriter text. STF
Define keyboard text. STF
Define the variable part of the text. STF
Define definition items. STF
Define computer code samples. STF
Deprecated. Define preformatted text.
tag Description DTD
Define an abbreviation with only the first letter. STF
Define abbreviations. STF
Define contact information for the document author or owner. STF
Define block references. STF
Deprecated. Define centered text. TF
Define short quotes. STF
Define citation. STF
The definition is inserted into the text. STF
Define deleted text. STF
Deprecated. Defines strikethrough text. TF
Deprecated. Defines strikethrough text. TF

Define anchor.

标签

描述

DTD

定义锚。

STF

定义文档与外部资源的关系。

STF

Tag

Description

标签

描述

DTD

定义框架集的窗口或框架。

F

定义框架集。

F

定义针对不支持框架的用户的替代内容。

TF

定义内联框架。

TF

DTD

标签

描述

DTD

定义供用户输入的 HTML 表单。

STF

定义输入控件。

STF

定义多行的文本输入控件。

STF

定义按钮。

STF

定义选择列表(下拉列表)。

STF

定义选择列表中相关选项的组合。

STF

定义选择列表中的选项。

STF

定义 input 元素的标注。

STF

定义围绕表单中元素的边框。

STF

定义 fieldset 元素的标题。

STF

不赞成使用。定义与文档相关的可搜索索引。

TF

标签

描述

DTD

定义无序列表。

STF

定义有序列表。

STF

  • 定义列表的项目。

    STF

    不赞成使用。定义目录列表。

    TF

    定义定义列表。

    STF

    定义定义列表中的项目。

    STF

    定义定义列表中项目的描述。

    STF

    不赞成使用。定义菜单列表。

    TF

    STF

    标签

    描述

    DTD

    Summary of DTD usage in html_html/css_WEB-ITnose

    定义图像。

    STF

    定义图像映射。

    STF

    定义图像地图内部的区域。

    STF

    Define the document's relationship to external resources. STF
    Tags Description DTD
    The window or frame that defines the frameset. F
    Define the frameset. F
    Define alternative content for users who don't support frames. TF
    Define inline frames. TF
    Tags Description DTD
    Define an HTML form for user input. STF
    Define input controls. STF
    Define a multi-line text input control. STF
    Define button. STF
    Define a selection list (drop-down list). STF
    Define combinations of related options in a selection list. STF
    Define the options in the selection list. STF
    Define the annotation of the input element. STF
    Define the border around the elements in the form. STF
    Define the title of the fieldset element. STF
    Deprecated. Defines a searchable index associated with the document. TF
    Tags Description DTD
    Define an unordered list. STF
    Define an ordered list. STF
  • Define the items of the list. STF
    Deprecated. Define directory listing. TF
    Define definition list. STF
    Define the items in the definition list. STF
    Define the description of the item in the definition list. STF
    Deprecated. Define menu list. TF
    Tags Description DTD
    Summary of DTD usage in html_html/css_WEB-ITnose Define the image. STF
    Define image map. STF
    Define the area inside the image map. STF

    标签

    描述

    DTD

    定义表格

    STF

    定义表格标题。

    STF

    定义表格中的表头单元格。

    STF

    定义表格中的行。

    STF

    定义表格中的单元。

    STF

    定义表格中的表头内容。

    STF

    定义表格中的主体内容。

    STF

    定义表格中的表注内容(脚注)。

    STF

    定义表格中一个或多个列的属性值。

    STF

    定义表格中供格式化的列组。

    STF

    Tag

    Description

    标签

    描述

    DTD

    定义文档的样式信息。

    STF

    定义文档中的节。

    STF

    定义文档中的节。

    STF

    DTD

    标签

    描述

    DTD

    定义关于文档的信息。

    STF

    定义文档的标题。

    STF

    定义关于 HTML 文档的元信息。

    STF

    定义页面中所有链接的默认地址或默认目标。

    STF

    不赞成使用。定义页面中文本的默认字体、颜色或尺寸。

    TF

    Definition table

    标签

    描述

    DTD

    <script></script>

    定义客户端脚本。

    STF

    定义针对不支持客户端脚本的用户的替代内容。

    STF

    不赞成使用。定义嵌入的 applet。

    TF

    定义嵌入的对象。

    STF

    定义对象的参数。

    STF

    STF

    td>

    Define the table title.

    STF

    Define the header cell in the table.

    STF

    Define the rows in the table. STF
    Define the cells in the table. STF
    Define the header content in the table. STF
    Define the main content in the table. STF
    Define the content of table notes (footnotes) in the table. STF
    Define attribute values ​​for one or more columns in the table. STF
    Define column groups in the table for formatting. STF
    Tags Description DTD
    Define the style information of the document. STF
    Define sections in the document. STF
    Define sections in the document. STF
    Tags Description DTD
    Define information about the document. STF
    Define the title of the document. STF
    Define meta-information about the HTML document. STF
    Define the default address or default target for all links in the page. STF
    Deprecated. Define the default font, color, or size for text on the page. TF
    Tags Description DTD
    <script><🎜> </script> Define client script. STF
    Define alternative content for users who do not support client-side scripting. STF
    Deprecated. Define embedded applets. TF
    Define embedded objects. STF
    Define the parameters of the object. STF
    Statement
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    What is the purpose of HTML tags?What is the purpose of HTML tags?Apr 28, 2025 am 12:02 AM

    HTMLtagsareessentialforstructuringwebpages,enhancingaccessibility,SEO,andperformance.1)Theyareenclosedinanglebracketsandusedinpairstocreateahierarchicalstructure.2)SemantictagslikeandimproveuserexperienceandSEO.3)Creativetagslikeenabledynamicgraphics

    What are self-closing tags? Give an example.What are self-closing tags? Give an example.Apr 27, 2025 am 12:04 AM

    Self-closingtagsinHTMLandXMLaretagsthatclosethemselveswithoutneedingaseparateclosingtag,simplifyingmarkupstructureandenhancingcodingefficiency.1)TheyareessentialinXMLforelementswithoutcontent,ensuringwell-formeddocuments.2)InHTML5,usageisflexiblebutr

    Beyond HTML: Essential Technologies for Web DevelopmentBeyond HTML: Essential Technologies for Web DevelopmentApr 26, 2025 am 12:04 AM

    To build a website with powerful functions and good user experience, HTML alone is not enough. The following technology is also required: JavaScript gives web page dynamic and interactiveness, and real-time changes are achieved by operating DOM. CSS is responsible for the style and layout of the web page to improve aesthetics and user experience. Modern frameworks and libraries such as React, Vue.js and Angular improve development efficiency and code organization structure.

    What are boolean attributes in HTML? Give some examples.What are boolean attributes in HTML? Give some examples.Apr 25, 2025 am 12:01 AM

    Boolean attributes are special attributes in HTML that are activated without a value. 1. The Boolean attribute controls the behavior of the element by whether it exists or not, such as disabled disable the input box. 2.Their working principle is to change element behavior according to the existence of attributes when the browser parses. 3. The basic usage is to directly add attributes, and the advanced usage can be dynamically controlled through JavaScript. 4. Common mistakes are mistakenly thinking that values ​​need to be set, and the correct writing method should be concise. 5. The best practice is to keep the code concise and use Boolean properties reasonably to optimize web page performance and user experience.

    How can you validate your HTML code?How can you validate your HTML code?Apr 24, 2025 am 12:04 AM

    HTML code can be cleaner with online validators, integrated tools and automated processes. 1) Use W3CMarkupValidationService to verify HTML code online. 2) Install and configure HTMLHint extension in VisualStudioCode for real-time verification. 3) Use HTMLTidy to automatically verify and clean HTML files in the construction process.

    HTML vs. CSS and JavaScript: Comparing Web TechnologiesHTML vs. CSS and JavaScript: Comparing Web TechnologiesApr 23, 2025 am 12:05 AM

    HTML, CSS and JavaScript are the core technologies for building modern web pages: 1. HTML defines the web page structure, 2. CSS is responsible for the appearance of the web page, 3. JavaScript provides web page dynamics and interactivity, and they work together to create a website with a good user experience.

    HTML as a Markup Language: Its Function and PurposeHTML as a Markup Language: Its Function and PurposeApr 22, 2025 am 12:02 AM

    The function of HTML is to define the structure and content of a web page, and its purpose is to provide a standardized way to display information. 1) HTML organizes various parts of the web page through tags and attributes, such as titles and paragraphs. 2) It supports the separation of content and performance and improves maintenance efficiency. 3) HTML is extensible, allowing custom tags to enhance SEO.

    The Future of HTML, CSS, and JavaScript: Web Development TrendsThe Future of HTML, CSS, and JavaScript: Web Development TrendsApr 19, 2025 am 12:02 AM

    The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.

    See all articles

    Hot AI Tools

    Undresser.AI Undress

    Undresser.AI Undress

    AI-powered app for creating realistic nude photos

    AI Clothes Remover

    AI Clothes Remover

    Online AI tool for removing clothes from photos.

    Undress AI Tool

    Undress AI Tool

    Undress images for free

    Clothoff.io

    Clothoff.io

    AI clothes remover

    Video Face Swap

    Video Face Swap

    Swap faces in any video effortlessly with our completely free AI face swap tool!

    Hot Tools

    SublimeText3 English version

    SublimeText3 English version

    Recommended: Win version, supports code prompts!

    ZendStudio 13.5.1 Mac

    ZendStudio 13.5.1 Mac

    Powerful PHP integrated development environment

    Safe Exam Browser

    Safe Exam Browser

    Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

    SublimeText3 Chinese version

    SublimeText3 Chinese version

    Chinese version, very easy to use

    EditPlus Chinese cracked version

    EditPlus Chinese cracked version

    Small size, syntax highlighting, does not support code prompt function