首页 > 其他分享 >SGML(标准通用标记语言)和HTML(超文本标记语言),XML(可扩展标记语言)和HTML的之间有什么关系?

SGML(标准通用标记语言)和HTML(超文本标记语言),XML(可扩展标记语言)和HTML的之间有什么关系?

时间:2024-11-26 10:58:56浏览次数:5  
标签:XML 语言 标记 markup SGML HTML focused data

SGML, HTML, and XML are all markup languages, but they have different roles and relationships:

  • SGML (Standard Generalized Markup Language): Think of SGML as the grandparent. It's a very powerful and complex metalanguage – a language for defining other markup languages. It defines the rules for how to create a markup language. It's extremely flexible but also quite difficult to learn and implement.

  • HTML (HyperText Markup Language): HTML is a specific markup language defined using SGML. It's like the child of SGML. It inherits the basic concepts of markup (tags, elements, attributes) from SGML, but it's much simpler and focused specifically on structuring web content for display in browsers. Early versions of HTML were actually SGML applications. However, HTML5, while inspired by SGML, is technically not an SGML application due to some differences in parsing rules. It's better to think of HTML5 as its own standard heavily influenced by SGML.

  • XML (Extensible Markup Language): XML is another offspring of SGML, like a sibling to HTML. It's also a metalanguage, meaning it can be used to define other markup languages. However, it's simpler than SGML while still retaining much of its power. XML is designed to be both human-readable and machine-readable, focusing on describing data rather than displaying it.

  • Relationship between XML and HTML: While both are descendants of SGML, XML and HTML serve different purposes. HTML is focused on presentation (how content looks in a browser), while XML is focused on data structure and transport. They can work together, though. For example, XHTML (Extensible HyperText Markup Language) is a reformulation of HTML as an XML application. This allows for stricter validation and easier parsing, although it's less commonly used now in favor of regular HTML5. Furthermore, XML can be used to store and transport data that is then displayed using HTML. For example, a web application might receive data in XML format and then use that data to dynamically generate HTML for display.

In short:

  • SGML is the powerful, complex parent.
  • HTML is the child focused on web page display.
  • XML is another child focused on data structure.
  • XHTML is a grandchild, a version of HTML defined using XML rules.

This family tree analogy helps understand the relationships and the evolution of these important markup languages.

标签:XML,语言,标记,markup,SGML,HTML,focused,data
From: https://www.cnblogs.com/ai888/p/18569695

相关文章

  • 说说你对HTML5的keygen标签的理解,它的作用是什么?
    HTML5的<keygen>元素原本的设计目的是为了辅助网页表单生成公钥-私钥对,以便进行客户端证书的创建。用户在提交表单时,<keygen>会生成一个新的密钥对。私钥会存储在用户的本地计算机上,而公钥则会与表单数据一起提交到服务器。具体来说,<keygen>的作用是:生成密钥对:它会在浏......
  • 报表控件FastReport VCL 中的本地化和语言切换
    在当今世界,向全球客户提供软件的能力至关重要。因此,FastReportVCL支持大约40种最广泛使用的语言,用于本地化用户界面。FastReportVCL是用于在软件中集成商务智能的现代解决方案。它提供了可视化模板设计器,可以访问最受欢迎的数据源,报告引擎,预览,将过滤器导出为30多种格式,并......
  • 大语言模型四大名著完全中译
    精通Transformers精通Transformers序言第一部分:介绍-领域内的最新发展,安装和HelloWorld应用程序第一章:从词袋模型到Transformer第二章:主题的实践介绍第二部分:变换模型-从自编码到自回归模型第三章:自动编码语言模型第四章:自回归模型与其他语言模型第五章:文本分类......
  • 【网页成品】古诗词网主题网页——WEB学生静态网页作业设计(HTML+CSS)(5个页面)
    ......
  • HTML静态网页成品作业(HTML+CSS)——动漫海绵宝宝介绍网页设计制作(3个页面)
    ......
  • HTML静态网页成品作业(HTML+CSS+JS)——动漫火影忍者网页设计制作(5个页面)
    ......
  • HTML中实现多选一且输入框的启用与禁用
    其他类别内容:<script>//控制"其他类别内容"输入框的启用与禁用functiontoggleTypeContent(){vartypeContentInput=document.getElementById("typecontent");varotherRadio=document.getElementById("other");......
  • 深入理解指针(C语言)
    本文目录引言概要正文一指针的类型(1)内置数据类型指针(2)数组指针与指向数组的指针(3)函数指针(4)结构体指针与联合体指针(5)空指针(void*)(6)指针的指针(7)常量指针与指向常量的指针二指针的步长三指针的解引用四指针运算(1)常见的指针运算(2)指针运算的注意事项指针的应用(1)数组处......
  • 基于html5的网上团购系统设计与实现
    通过百度网盘分享的文件:基于html5的网上团购系统设计与实现链接:https://pan.baidu.com/s/1kBQ4_QEowwjVQkZ9bvmlYQ?pwd=ivsl  第1章绪论1.1研究背景互联网时代不仅仅是通过各种各样的电脑进行网络连接的时代,也包含了移动终端连接互联网进行复杂处理的一些事情。传统......
  • HTML飞舞的爱心
    目录系列文章写在前面完整代码代码分析写在后面系列文章序号目录1HTML满屏跳动的爱心(可写字)2HTML五彩缤纷的爱心3HTML满屏漂浮爱心4HTML情人节快乐5HTML蓝色爱心射线6HTML跳动的爱心(简易版)7HTML粒子爱心8HTML蓝色动态爱心9HTML跳动的爱心(双心版)10HTML橙色动态粒子爱......