HTML vocabulary
type: Ontology
type: Dataset
conforms to: https://datatracker.ietf.org/doc/html/rfc1942
created: 2021-12-08
creator: Flores Bakker
creator: Thomas de Groot
creator: Wouter Beek
contributor: Rosaline de Haan
contributor: Chayenne Halvemaan
contributor: Kurt Cagle
contributor: Jordi Marti Ruiz
introduction: The RDF-based HTML vocabulary introduces a comprehensive ontology that models the elements and attributes of HTML using OWL (Web Ontology Language), combined with a powerful SHACL (Shapes Constraint Language) layer that leverages SHACL Advanced Features to support HTML serialization. The ontology defines classes representing HTML elements (e.g., html:Div, html:Span, html:Table) and properties corresponding to HTML attributes (e.g., html:class, html:style), together with relationships that describe document structure, content models, and element nesting. Beyond modeling, the SHACL component employs SHACL rules and functions to transform RDF-based representations of HTML into valid HTML code, enabling automated and standards-compliant serialization of documents directly from their semantic descriptions. This computational datamodel allows organizations to generate and validate new information products, query and annotate HTML content for analysis and insight, and flexibly adapt and reuse existing components to address evolving needs, all within a semantic web based framework. This eliminates the need to apply traditional programming technologies or industry solutions with a vendor lock-in when working with HTML. The vocabulary forms the foundation of a robust information management ecosystem that harmonizes the expressive power of RDF with the global ubiquity of HTML.
background: HTML is the backbone of the modern web, enabling the creation and sharing of structured information across platforms and devices. Today, working with HTML requires the use of traditional programming technologies or industry solutions with a vendor lock-in. In addition, HTML documents that are produced through these means often lack a semantic context that could explain or validate the HTML document, whether on document, section or element level. The story behind the HTML document that could help man or machine in making sense of it, is missing. This makes HTML documents difficult to fully understand based on their own information or hard to reuse or transform without the presence of some professional expert. As organizations increasingly seek to improve control of their information management, the need arises for a formal bridge between HTML and the Semantic Web. An RDF-based HTML vocabulary addresses this gap by providing machine-interpretable representations of HTML elements and attributes, and serialisation algorithms, enabling seamless integration with linked data technologies and standards. As HTML documents are widely used in a myriad of use cases, from websites, dashboard, applications, to social media and documents, this vocabulary helps organisations and individuals to get a better grasp of their information products.
objective: With the HTML vocabulary, organizations gain the capacity to (1) generate and validate, (2) query and annotate, and (3) reuse and adapt HTML documents within a semantic web framework. Generating and validating comes down to creating new information products and rigorously validating their accuracy and completeness. Querying and annotating HTML documents helps to gain insights and understand these products. Finally, adapting and reusing is about adapting existing information products to swiftly respond to evolving scenarios and reusing valuable components across a spectrum of contexts. This innovative vocabulary forms the cornerstone of an information management ecosystem that harmonizes the power of RDF with the ubiquity of HTML.
audience: This document is intended for a diverse audience of web developers, content managers, semantic web enthusiasts, and anyone seeking to enhance the sustainability of information management, information processing and information technology.
acknowledgements: This standard has been developed through collaborative efforts and contributions from a diverse community of experts and stakeholders. Their dedication and expertise have been instrumental in bringing this vocabulary to life.
related work: The HTML vocabulary is part of a family of RDF-based document languages. Central to this family of document languages is the DOM vocabulary, which models the tree-like structure underlying a document as specified by the W3C Living Standard for the DOM. Different languages, such as the HTML vocabulary, the XML vocabulary and the RDFa vocabulary, refer through subclass and subproperty relations to the DOM vocabulary. ``` DOM vocabulary ├── HTML vocabulary ├── XML vocabulary │ ├── XMLNS vocabulary │ ├── XLINK vocabulary │ ├── XSI vocabulary │ ├── OntoSVG │ ├── OntoArchimate │ └── ... └── RDFa vocabulary ``` ##### DOM vocabulary The DOM vocabulary is an RDF-based representation of the Document Object Model, enabling DOM documents to be expressed in RDF. It models the W3C living standard for DOM. As a result, DOM-based documents can be represented, queried, generated, validated, analyzed, transformed, and reused as semantic objects themselves. The HTML vocabulary builds upon the DOM vocabulary, as explored in more detail in its dedicated description. See https://github.com/floresbakker/domvoc. ##### XML vocabulary The XML vocabulary is an RDF-based representation of the W3C XML standard to express XML-documents in RDF. XML documents can thus be represented, queried, generated, validated, analysed, transformed and reused as semantic objects themselves. Since XML can be embedded in HTML (and vice versa), RDF-based representations of XML code can also be embedded within RDF-based representations of HTML code (and vice versa). See https://github.com/floresbakker/xmlvoc. The XMLNS, XLINK, and XSI vocabularies provide RDF-based models of their respective W3C XML-related standards. The XMLNS vocabulary formally represents XML Namespace declarations, defining classes and properties to describe namespace attributes and their use within XML documents. The XLINK vocabulary formalizes the XML Linking Language (XLink) Version 1.1, offering terms to model the structure and semantics o…
description: The HTML vocabulary establishes a draft standard that enables the semantic representation of any HTML document in RDF. The vocabulary can be used to generate, validate, query, annotate, reuse and adapt HTML documents within a semantic web framework. The vocabulary is based on the Living Standard of HTML (https://html.spec.whatwg.org/) and offers classes to represent HTML elements, datatype properties to represent HTML attributes and a small number of SHACL shapes and SPARQL functions for the serialisation of HTML code. The example below shows how a 'Hello world!' snippet of HTML code can be represented in RDF using the HTML vocabulary. ```Example A 'Hello world!' example in HTML code: Hello world! Hello world! ``` This is represented in RDF using the HTML vocabulary as follows: ```Example prefix doc: <http://www.example.org/document/> prefix html: <https://www.w3.org/html/model/def/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> doc:helloWorld a html:Document ; rdf:_1 doc:docType ; rdf:_2 doc:html . doc:docType a html:DocumentType ; html:documentTypeName "html" . doc:html a html:Html ; rdf:_1 doc:head ; rdf:_2 doc:body . doc:head a html:Head ; rdf:_1 doc:title . doc:title a html:Title ; rdf:_1 doc:titleText . doc:titleText a html:Text ; html:fragment "Hello world!" . doc:body a html:Body ; rdf:_1 doc:paragraph ; doc:paragraph a html:P ; rdf:_1 doc:paragraphText . doc:paragraphText a html:Text ; html:fragment "Hello world!" . ``` #### Basic components of the ontology ##### HTML document The HTML vocabulary describes all the components of the HTML Living Standard. Central to the Living Standard is the concept of an HTML document. An HTML document is a document written in the standard markup language HyperText Markup Language (HTML) and designed to be displayed in a web browser. The HTML of that document defines its content and structure. An HTML document contains underlying nodes, like HTML elements, text, comments, processing instructions, CDATA sections …
abstract: The HTML vocabulary establishes a draft standard to semantically represent HTML documents in RDF. The vocabulary is based on the HTML Living Standard. It includes classes for HTML elements, datatype properties for attributes, and SHACL shapes for code serialization. HTML documents can thus be represented, queried, generated, validated, analysed, transformed and reused as semantic objects themselves. As HTML documents are widely used in a myriad of use cases, from websites, dashboard, applications, to social media and documents, this vocabulary helps organisations and individuals to get a better grasp of their information products.
example: An 'hello world' HTML document: An 'hello world' HTML page represented in RDF Hello, World! This can be rendered in RDF using the HTML vocabulary as follows: prefix doc: <http://www.example.org/document/> prefix html: <https://www.w3.org/html/model/def/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> doc:1 a html:Document; rdf:_1 doc:1.1; rdf:_2 doc:1.2. doc:1.1 a html:DocumentType; html:documentTypeName 'html'. doc:1.2 a html:Html; rdf:_1 doc:1.21; rdf:_2 doc:1.218. doc:1.163 a html:Meta; html:charset "utf-8"; html:http-equiv "Content-Type". doc:1.21 a html:Head; rdf:_1 doc:1.27; rdf:_2 doc:1.93; rdf:_3 doc:1.163. doc:1.218 a html:Body; rdf:_1 doc:1.218.1. doc:1.218.1 a html:Text; html:fragment "Hello, World!". doc:1.27 a html:Title; rdf:_1 doc:1.27.1. doc:1.27.1 a html:Text; html:fragment "An 'hello world' HTML page represented in RDF". doc:1.93 a html:StyleSheet; rdf:_1 doc:1.93.1. doc:1.93.1 a html:Text; html:fragment ".italic-text {font-style: italic;}".
language: iso639-1:en
license: http://creativecommons.org/licenses/by/4.0
publisher: https://www.w3.org/community/htmlvoc/
group: htmlvoc
short name: htmlvoc
spec status: CG-DRAFT
latest version: https://github.com/floresbakker/htmlvoc
status: UnderDevelopment
subject: HTML
source: htmlvoc
imports: terms
imports: owl#
imports: 22-rdf-syntax-ns#
imports: rdf-schema#
imports: shacl#
imports: core#
version info: 0.2.0
declare: aria
declare: dom
declare: function
declare: https://www.w3.org/html/id/decl/html
declare: mathml
declare: parameter
declare: https://www.w3.org/html/id/decl/rdf
declare: rdfs
declare: rule
declare: section
declare: shp
declare: standard
declare: https://www.w3.org/html/id/decl/svg
declare: target
declare: xsd
preferred namespace prefix: html
uri regex pattern: ^https://www.w3.org/html/model/def/

aria
prefix: aria
namespace: http://www.w3.org/ns/wai-aria/

dom
prefix: dom
namespace: http://www.w3.org/DOM/model/def/

function
prefix: function
namespace: https://www.w3.org/html/model/function/

https://www.w3.org/html/id/decl/html
prefix: html
namespace: HTML vocabulary

mathml
prefix: mathml
namespace: http://www.w3.org/1998/Math/MathML/model/def/

parameter
prefix: parameter
namespace: https://www.w3.org/html/model/parameter/

https://www.w3.org/html/id/decl/rdf
prefix: rdf
namespace: http://www.w3.org/1999/02/22-rdf-syntax-ns#

rdfs
prefix: rdfs
namespace: http://www.w3.org/2000/01/rdf-schema#

rule
prefix: rule
namespace: https://www.w3.org/html/model/rule/

section
prefix: section
namespace: https://www.w3.org/html/id/section/

shp
prefix: shp
namespace: https://www.w3.org/html/model/shp/

standard
prefix: standard
namespace: https://www.w3.org/html/id/standard/

https://www.w3.org/html/id/decl/svg
prefix: svg
namespace: http://www.w3.org/SVG/model/def/

target
prefix: target
namespace: https://www.w3.org/html/model/target/

xsd
prefix: xsd
namespace: http://www.w3.org/2001/XMLSchema#

HTML Living Standard
type: Standard
created: 2021-11-09
source: https://html.spec.whatwg.org
definition: HTML is the World Wide Web's core markup language. It is described in the WHATWG "HTML Living Standard" specification.

§ 3.2 Elements
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#elements
definition: A section in the living standard of HTML.

§ 3.2.5.2 Kinds of content
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#kinds-of-content
definition: A section in the living standard of HTML.

§ 3.2.5.2.1 Metadata content
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#metadata-content
definition: A section in the living standard of HTML.

§ 3.2.5.2.2 Flow content
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#flow-content
definition: A section in the living standard of HTML.

§ 3.2.5.2.3 Sectioning content
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#sectioning-content
definition: A section in the living standard of HTML.

§ 3.2.5.2.4 Heading content
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#heading-content
definition: A section in the living standard of HTML.

§ 3.2.5.2.5 Phrasing content
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#phrasing-content
definition: A section in the living standard of HTML.

§ 3.2.5.2.6 Metadata content
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#embedded-content-2
definition: A section in the living standard of HTML.

§ 3.2.5.2.7 Interactive content
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#interactive-content
definition: A section in the living standard of HTML.

§ 3.2.5.2.8 Palpable content
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#palpable-content
definition: A section in the living standard of HTML.

§ 3.2.5.2.9 Script-supporting elements
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#script-supporting-elements
definition: A section in the living standard of HTML.

§ 3.2.5.3 Transparant content models
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#transparent-content-models
definition: A section in the living standard of HTML.

§ 4.1.1 The html element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-html-element
definition: A section in the living standard of HTML.

§ 4.2.1 The head element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-head-element
definition: A section in the living standard of HTML.

§ 4.2.2 The title element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-title-element
definition: A section in the living standard of HTML.

§ 4.2.2 The base element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-base-element
definition: A section in the living standard of HTML.

§ 4.2.4 The link element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-link-element
definition: A section in the living standard of HTML.

§ 4.2.5 The meta element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-meta-element
definition: A section in the living standard of HTML.

§ 4.2.6 The style element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-style-element
definition: A section in the living standard of HTML.

§ 4.3.1 The body element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-body-element
definition: A section in the living standard of HTML.

§ 4.3.2 The article element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-article-element
definition: A section in the living standard of HTML.

§ 4.3.3 The section element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-section-element
definition: A section in the living standard of HTML.

§ 4.3.4 The nav element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-nav-element
definition: A section in the living standard of HTML.

§ 4.3.5 The aside element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-aside-element
definition: A section in the living standard of HTML.

§ 4.3.6 The h1, h2, h3, h4 and h6 elements
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements
definition: A section in the living standard of HTML.

§ 4.3.7 The hgroup element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-hgroup-element
definition: A section in the living standard of HTML.

§ 4.3.8 The header element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-header-element
definition: A section in the living standard of HTML.

§ 4.3.9 The footer element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-footer-element
definition: A section in the living standard of HTML.

§ 4.3.10 The address element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-address-element
definition: A section in the living standard of HTML.

§ 4.4.1 The p element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-p-element
definition: A section in the living standard of HTML.

§ 4.4.2 The hr element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-hr-element
definition: A section in the living standard of HTML.

§ 4.4.3 The pre element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-pre-element
definition: A section in the living standard of HTML.

§ 4.4.4 The blockquote element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-blockquote-element
definition: A section in the living standard of HTML.

§ 4.4.5 The ol element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-ol-element
definition: A section in the living standard of HTML.

§ 4.4.6 The ul element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-ul-element
definition: A section in the living standard of HTML.

§ 4.4.7 The menu element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-menu-element
definition: A section in the living standard of HTML.

§ 4.4.8 The li element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-li-element
definition: A section in the living standard of HTML.

§ 4.4.9 The dl element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-dl-element
definition: A section in the living standard of HTML.

§ 4.4.10 The dt element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-dt-element
definition: A section in the living standard of HTML.

§ 4.4.11 The dd element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-dd-element
definition: A section in the living standard of HTML.

§ 4.4.12 The figure element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-figure-element
definition: A section in the living standard of HTML.

§ 4.4.13 The figcaption element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-figcaption-element
definition: A section in the living standard of HTML.

§ 4.4.14 The main element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-main-element
definition: A section in the living standard of HTML.

§ 4.4.15 The search element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-search-element
definition: A section in the living standard of HTML.

§ 4.4.16 The div element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-div-element
definition: A section in the living standard of HTML.

§ 4.5.1 The a element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-a-element
definition: A section in the living standard of HTML.

§ 4.5.2 The em element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-em-element
definition: A section in the living standard of HTML.

§ 4.5.3 The strong element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-strong-element
definition: A section in the living standard of HTML.

§ 4.5.4 The small element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-small-element
definition: A section in the living standard of HTML.

§ 4.5.5 The s element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-s-element
definition: A section in the living standard of HTML.

§ 4.5.6 The cite element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-cite-element
definition: A section in the living standard of HTML.

§ 4.5.7 The q element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-q-element
definition: A section in the living standard of HTML.

§ 4.5.8 The dfn element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-dfn-element
definition: A section in the living standard of HTML.

§ 4.5.9 The abbr element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-abbr-element
definition: A section in the living standard of HTML.

§ 4.5.10 The ruby element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-ruby-element
definition: A section in the living standard of HTML.

§ 4.5.11 The rt element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-rt-element
definition: A section in the living standard of HTML.

§ 4.5.12 The rp element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-rp-element
definition: A section in the living standard of HTML.

§ 4.5.13 The data element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-data-element
definition: A section in the living standard of HTML.

§ 4.5.14 The time element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-time-element
definition: A section in the living standard of HTML.

§ 4.5.15 The code element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-code-element
definition: A section in the living standard of HTML.

§ 4.5.16 The var element
type: Text
is part of: HTML Living Standard
source: hhttps://html.spec.whatwg.org/#the-var-element
definition: A section in the living standard of HTML.

§ 4.5.17 The samp element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-samp-element
definition: A section in the living standard of HTML.

§ 4.5.18 The kbd element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-kbd-element
definition: A section in the living standard of HTML.

§ 4.5.19 The sub and sup elements
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-sub-and-sup-elements
definition: A section in the living standard of HTML.

§ 4.5.20 The i element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-i-element
definition: A section in the living standard of HTML.

§ 4.5.21 The b element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-b-element
definition: A section in the living standard of HTML.

§ 4.5.22 The u element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-u-element
definition: A section in the living standard of HTML.

§ 4.5.23 The mark element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-mark-element
definition: A section in the living standard of HTML.

§ 4.5.24 The bdi element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-bdi-element
definition: A section in the living standard of HTML.

§ 4.5.25 The bdo element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-bdo-element
definition: A section in the living standard of HTML.

§ 4.5.26 The span element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-span-element
definition: A section in the living standard of HTML.

§ 4.5.27 The br element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-br-element
definition: A section in the living standard of HTML.

§ 4.5.28 The wbr element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-wbr-element
definition: A section in the living standard of HTML.

§ 4.7.1 The ins element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-ins-element
definition: A section in the living standard of HTML.

§ 4.7.2 The del element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-del-element
definition: A section in the living standard of HTML.

§ 4.8.1 The picture element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-picture-element
definition: A section in the living standard of HTML.

§ 4.8.2 The source element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-source-element
definition: A section in the living standard of HTML.

§ 4.8.3 The img element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-img-element
definition: A section in the living standard of HTML.

§ 4.8.5 The iframe element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-iframe-element
definition: A section in the living standard of HTML.

§ 4.8.6 The embed element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-embed-element
definition: A section in the living standard of HTML.

§ 4.8.7 The object element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-object-element
definition: A section in the living standard of HTML.

§ 4.8.8 The video element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-video-element
definition: A section in the living standard of HTML.

§ 4.8.9 The audio element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-audio-element
definition: A section in the living standard of HTML.

§ 4.8.10 The track element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-track-element
definition: A section in the living standard of HTML.

§ 4.8.12 The map element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-map-element
definition: A section in the living standard of HTML.

§ 4.8.13 The area element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-area-element
definition: A section in the living standard of HTML.

§ 4.8.15 MathML
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#mathml
definition: A section in the living standard of HTML.

§ 4.8.16 SVG
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#svg-0
definition: A section in the living standard of HTML.

§ 4.9.1 The table element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-table-element
definition: A section in the living standard of HTML.

§ 4.9.2 The caption element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-caption-element
definition: A section in the living standard of HTML.

§ 4.9.3 The colgroup element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-colgroup-element
definition: A section in the living standard of HTML.

§ 4.9.4. The col element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-col-element
definition: A section in the living standard of HTML.

§ 4.9.5 The tbody element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-tbody-element
definition: A section in the living standard of HTML.

§ 4.9.6 The thead element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-thead-element
definition: A section in the living standard of HTML.

§ 4.9.7 The tfoot element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-tfoot-element
definition: A section in the living standard of HTML.

§ 4.9.8 The tr element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-tr-element
definition: A section in the living standard of HTML.

§ 4.9.9 The td element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-td-element
definition: A section in the living standard of HTML.

§ 4.9.10 The th element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-th-element
definition: A section in the living standard of HTML.

§ 4.10.2 Categories
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#categories
definition: A section in the living standard of HTML.

§ 4.10.3 The form element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-form-element
definition: A section in the living standard of HTML.

§ 4.10.4 The label element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-label-element
definition: A section in the living standard of HTML.

§ 4.10.5 The input element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-input-element
definition: A section in the living standard of HTML.

§ 4.10.6 The button element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-button-element
definition: A section in the living standard of HTML.

§ 4.10.7 The select element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-select-element
definition: A section in the living standard of HTML.

§ 4.10.8 The datalist element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-datalist-element
definition: A section in the living standard of HTML.

§ 4.10.9 The optgroup element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-optgroup-element
definition: A section in the living standard of HTML.

§ 4.10.10 The option element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-option-element
definition: A section in the living standard of HTML.

§ 4.10.11 The textarea element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-textarea-element
definition: A section in the living standard of HTML.

§ 4.10.12 The output element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-output-element
definition: A section in the living standard of HTML.

§ 4.10.13 The progress element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-progress-element
definition: A section in the living standard of HTML.

§ 4.10.14 The meter element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-meter-element
definition: A section in the living standard of HTML.

§ 4.10.15 The fieldset element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-fieldset-element
definition: A section in the living standard of HTML.

§ 4.10.16 The legend element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-legend-element
definition: A section in the living standard of HTML.

§ 4.11.1 The details element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-details-element
definition: A section in the living standard of HTML.

§ 4.11.2 The summary element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-summary-element
definition: A section in the living standard of HTML.

§ 4.11.4 The dialog element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-dialog-element
definition: A section in the living standard of HTML.

§ 4.12.1 The script element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-script-element
definition: A section in the living standard of HTML.

§ 4.12.2 The noscript element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-noscript-element
definition: A section in the living standard of HTML.

§ 4.12.3 The template element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-template-element
definition: A section in the living standard of HTML.

§ 4.12.4 The slot element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-slot-element
definition: A section in the living standard of HTML.

§ 4.12.5 The canvas element
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#the-canvas-element
definition: A section in the living standard of HTML.

§ 4.13.3 Core concepts
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#custom-elements-core-concepts
definition: A section in the living standard of HTML.

§ 8.1.8 Events
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#events
definition: A section in the living standard of HTML.

§ 8.1.8.1 Event handlers
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#event-handler-attributes
definition: A section in the living standard of HTML.

§ 13.1 Writing HTML documents
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#writing
definition: A section in the living standard of HTML.

§ 13.1.1 The DOCTYPE
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/multipage/syntax.html#the-doctype
definition: A section in the living standard of HTML.

§ 13.1.2 Elements
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#elements-2
definition: A section in the living standard of HTML.

§ 13.1.2 Void elements
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#void-elements
definition: A section in the living standard of HTML.

§ 13.1.2 Normal elements
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#normal-elements
definition: A section in the living standard of HTML.

§ 13.1.2 Foreign elements
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#foreign-elements
definition: A section in the living standard of HTML.

§ 13.1.2 Raw text elements
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#raw-text-elements
definition: A section in the living standard of HTML.

§ 13.1.2 Escapable raw text elements
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#escapable-raw-text-elements
definition: A section in the living standard of HTML.

§ 13.1.2.1 Start tags
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#start-tags
definition: A section in the living standard of HTML.

§ 13.1.2.2 End tags
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#end-tags
definition: A section in the living standard of HTML.

§ 13.1.2.3 Attributes
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#attributes-2
definition: A section in the living standard of HTML.

§ 13.1.3 Text
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#text-2
definition: A section in the living standard of HTML.

§ 13.1.5 CDATA sections
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#cdata-sections
definition: A section in the living standard of HTML.

§ 13.1.6 Comments
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#comments
definition: A section in the living standard of HTML.

§ 13.3 Serializing HTML fragments
type: Text
is part of: HTML Living Standard
source: https://html.spec.whatwg.org/#serialising-html-fragments
definition: A section in the living standard of HTML.

HTML DOM element
type: Class
conforms to: § 3.2 Elements
subclass of: Element
definition: An HTML element in the Document Object Model (DOM) represents a thing; that is, it has intrinsic meaning, also known as semantics. An element consists of an HTML start tag and an HTML end tag and has value content. An HTML start tag consists of a "smaller than" character ("<") and a tag name, followed by a "greater than" character (">"). An HTML end tag consists of a "smaller than" character ("<"), a slash ("/") and a tag name, followed by a "greater than" character (">"). The value content of an element can be arbitrarily complex.

normal element
type: Class
conforms to: § 13.1.2 Normal elements
subclass of: HTML DOM element
definition: Exclusionary definition: the elements that are neither (1) void elements, (2) the template element, (3) raw text elements, (4) escapable raw text elements, nor (5) foreign elements.

raw text element
type: Class
conforms to: § 13.1.2 Raw text elements
subclass of: HTML DOM element
definition: HTML element where the text inside is treated as raw text and not parsed as HTML.

escapable raw text element
type: Class
conforms to: § 13.1.2 Escapable raw text elements
subclass of: HTML DOM element
definition: HTML element where the text inside is treated as raw text and not parsed as HTML, but character references can still be escaped within their text content.

foreign element
type: Class
conforms to: § 13.1.2 Foreign elements
subclass of: HTML DOM element
definition: HTML element from a namespace other than the HTML namespace.

void element
type: Class
subclass of: HTML DOM element
definition: A HTML element whose content model never allows it to have contents under any circumstances. Void elements can have attributes.

custom HTML element
type: Class
subclass of: HTML DOM element
conforms to: § 4.13.3 Core concepts
definition: A custom element is an element that is custom. Informally, this means that its constructor and prototype are defined by the author, instead of by the user agent. This author-supplied constructor function is called the custom element constructor. Two distinct types of custom elements can be defined: An autonomous custom element, which is defined with no extends option. These types of custom elements have a local name equal to their defined name. A customized built-in element, which is defined with an extends option. These types of custom elements have a local name equal to the value passed in their extends option, and their defined name is used as the value of the is attribute, which therefore must be a valid custom element name.
example: ex:someFlagIconElement rdf:type ex:FlagIcon. ex:FlagIcon rdf:type html:CustomElement; html:tag 'flag-icon'; html:extends html:Element; rdfs:isDefinedBy ex:.

autonomous custom element
type: Class
subclass of: custom HTML element
equivalent class: Restriction
  some values from:
    intersection of: HTML DOM element
    intersection of:
      complement of:
        union of: customized built-in element
        union of: escapable raw text element
        union of: foreign element
        union of: normal element
        union of: raw text element
        union of: void element
  on property: extends
conforms to: § 4.13.3 Core concepts
definition: An autonomous custom element is a custom HTML element that is defined with no extends option. These types of custom elements have a local name equal to their defined name.

customized built-in element
type: Class
subclass of: custom HTML element
equivalent class: Restriction
  some values from:
    union of: escapable raw text element
    union of: foreign element
    union of: normal element
    union of: raw text element
    union of: void element
  on property: extends
conforms to: § 4.13.3 Core concepts
definition: A customized built-in element is a custom HTML element that is defined with an extends option. These types of custom elements have a local name equal to the value passed in their extends option, and their defined name is used as the value of the is attribute, which therefore must be a valid custom element name.

CDATASection
type: Class
subclass of: CDATASection
conforms to: § 13.1.5 CDATA sections
definition: A DOM element with textual content that contain characters that would otherwise be treated as markup. A CDATA section is typically used to include code snippets, scripts, or other data within an HTML document without having to worry about escaping special characters. In HTML, a CDATA section is denoted by enclosing the block of text within and tags. Anything contained within these tags is treated as raw character data and is not parsed as markup.
example: p
example: type
example: math
example: ms
example:
  example:
    y]]: ms
    y]]: mo
    y]]: mn
    y]]: 3
    y]]:
      y]]:
        y3]]: ms
        y3]]: math
        y3]]: @en; skos:prefLabel 'CDATA section'@en; rdfs:isDefinedBy html:. # Comment html:Comment a owl:Class; rdfs:subClassOf dom:Comment; dct:conformsTo section:13.1.6; skos:definition 'A comment is a markup construct used to insert comments within the HTML code. Comments are not displayed in the web browser, but they can be viewed in the HTML source code. Comments are typically used to add notes, descriptions, or explanations to the HTML code for the benefit of developers, without affecting the rendered output in the browser. Comments are denoted by enclosing the comment text within tags. Anything contained within these tags is treated as a comment and is ignored by the web browser during rendering.'@en; skos:example
        y3]]: @en; skos:prefLabel 'comment element'@en; rdfs:isDefinedBy html:. # Text node html:Text a owl:Class; rdfs:subClassOf dom:Text; dct:conformsTo section:13.1.3; skos:definition 'Textual content that does not contain any HTML vocabulary.'@en; skos:example 'A numeric value that appears in a table cell.'@en, 'A natural language sentence that appears in a table caption.'@en; skos:prefLabel 'text'@en; rdfs:isDefinedBy html:. # Content category html:ContentCategory rdf:type owl:Class; dct:conformsTo section:3.2.5.2; skos:definition 'Each element in HTML falls into zero or more categories that group elements with similar characteristics together.'@en; skos:prefLabel 'content category'@en; skos:note 'Some elements also fall into other categories, which are defined in other parts of this specification.'; rdfs:isDefinedBy html:. html:MetadataContent rdf:type owl:Class; rdfs:subClassOf html:ContentCategory; owl:unionOf (html:Base html:Link html:Meta html:Noscript html:Script html:Style html:Template html:Title); dct:conformsTo section:3.2.5.2.1; skos:definition 'Metadata content is content that sets up the presentation or behavior of the rest of the content, or that sets up the relationship of the document with other documents, or that conveys other "out of band" information.'@en; skos:prefLabel 'Metadata content'@en; rdfs:isDefinedBy html:. html:FlowContent rdf:type owl:Class; rdfs:subClassOf html:ContentCategory; owl:unionOf ( [ owl:intersectionOf ( html:Area [ a owl:Restriction; owl:someValuesFrom html:Map; owl:onProperty [ owl:inverseOf rdfs:member] ] ) ] [ owl:unionOf ( [ owl:intersectionOf ( html:Link [ a owl:Restriction; owl:cardinality "1"^^xsd:nonNegativeInteger; owl:onProperty html:itemprop ] ) ] [ owl:intersectionOf ( html:Link [ owl:unionOf ( [ a owl:Restriction; owl:onProperty html:rel; owl:hasValue "dns-prefetch" ] [ a owl:Restriction; owl:onProperty html:rel; owl:hasValue "modulepreload" ] [ a owl:Restriction; owl:onProperty html:rel; owl:hasValue "pingback" ] [ a …

Node shape for foreign element
type: NodeShape
order: 1
definition: A node shape to transform the contents of a foreign element into a html fragment.
rule: SPARQL rule for foreign element
target class: foreign element

SPARQL target for foreign element nodeshape
type: SPARQLTarget
definition: A SPARQL Target to select all foreign element nodes in an HTML document that do not have an HTML fragment yet, but who do have a XML fragment.
prefixes: HTML vocabulary
select: select $this { # Select all foreign element nodes with a XML fragment... $this a/rdfs:subClassOf* html:ForeignElement; xml:fragment []. # ...that do not yet have an HTML fragment. filter not exists { $this html:fragment []. } }

SPARQL rule for foreign element
type: SPARQLRule
definition: A SPARQL rule to establish a HTML fragment for a foreign element based on its XML fragment.
prefixes: HTML vocabulary
construct: construct { $this html:fragment ?fragment. } where { $this xml:fragment ?fragment. }

the getElementFragment() function
type: SPARQLFunction
definition: A SPARQL function that returns an HTML fragment for an element in an HTML document.
parameter:
  path: element
  datatype: anyURI
  description: A html element in a HTML document.
prefixes: HTML vocabulary
return type: string
select: select ?result { optional { # Retrieve the tag name of the element. $element a ?class. ?class html:tag ?tag; rdfs:subClassOf ?elementType. # Get the HTML attributes for the element, if there are any. bind(function:getElementAttribute($element) as ?attributes) # Get the HTML fragments of child nodes for the element, if there are any. bind(function:getChildNodeFragment($element) as ?childFragments) # Build the HTML fragment for this HTML element, by combining everything retrieved above. bind(concat( '<',?tag,if(?attributes='','',concat(' ',?attributes)),'>', # Void elements have neither content nor a closing tag. if(?elementType=html:VoidElement,'',concat(?childFragments,'</',?tag,'>'))) as ?fragment) } bind(coalesce(?fragment, '') as ?result) }

the getTextFragment() function
type: SPARQLFunction
definition: A SPARQL function that returns an HTML fragment for a text node in an HTML document.
parameter:
  path: text
  datatype: anyURI
  description: A HTML text node in a HTML document.
prefixes: HTML vocabulary
return type: string
select: select ?result { # Text is stored in de data attribute of DOM text nodes $text dom:data ?data. optional { # Establish the HTML fragment for this HTML text node bind(strdt(?data,xsd:string) as ?fragment) } bind(coalesce(?fragment, '') as ?result) }

the getCommentFragment() function
type: SPARQLFunction
definition: A SPARQL function that returns an HTML fragment for a comment node in an HTML document.
parameter:
  path: comment
  datatype: anyURI
  description: A HTML comment in a HTML document.
prefixes: HTML vocabulary
return type: string
select: select ?result { optional { # Establish the HTML fragment for this HTML comment bind(concat(' ') as ?fragment) } bind(coalesce(?fragment, '') as ?result) }

the getProcessingInstructionFragment() function
type: SPARQLFunction
definition: A SPARQL function that returns an HTML fragment for a processing instruction in an HTML document.
parameter:
  path: processingInstruction
  datatype: anyURI
  description: A HTML processing instruction in a HTML document.
prefixes: HTML vocabulary
return type: string
select: select ?result { optional { # Establish the HTML fragment for this HTML processingInstruction bind(concat('<?',function:getChildNodeFragment($processingInstruction),'>') as ?fragment) } bind(coalesce(?fragment, '') as ?result) }

the getDocumentTypeFragment() function
type: SPARQLFunction
definition: A SPARQL function that returns an HTML fragment for a document type in an HTML document.
parameter:
  path: doctype
  datatype: anyURI
  description: An HTML DocumentType in a HTML document.
prefixes: HTML vocabulary
return type: string
select: select ?result { optional { # Establish the doctype name for this Document Type. $doctype html:documentTypeName ?name. bind(concat(' ') as ?fragment) } bind(coalesce(?fragment, '') as ?result) }

the getDocumentFragment() function
type: SPARQLFunction
definition: A SPARQL function that returns an HTML fragment for an HTML document.
parameter:
  path: document
  datatype: anyURI
  description: An HTML document.
prefixes: HTML vocabulary
return type: string
select: select ?result { optional { # Establish the HTML fragment of the HTML document by retrieving the HTML fragments of all child nodes. bind(function:getChildNodeFragment($document) as ?fragment) } bind(coalesce(?fragment, '') as ?result) }

the getChildNodeFragment() function
type: SPARQLFunction
definition: A SPARQL function that returns an HTML fragment of child nodes for a node in an HTML document.
parameter:
  path: parentNode
  datatype: anyURI
  description: A node in an HTML document.
prefixes: HTML vocabulary
return type: string
select: select ?result { optional { # Get the HTML fragments of child nodes, if there are any. select $parentNode (group_concat(str(?childFragment);separator='') as ?childFragments) { { select $parentNode ?member ?childFragment { $parentNode ?member ?childNode. filter(function:isMembershipProperty(?member)) ?childNode html:fragment ?childFragment. } order by function:getMemberIndex(?member) } } group by $parentNode } bind(coalesce(?childFragments, '') as ?result) }

the getElementAttribute() function
type: SPARQLFunction
definition: A SPARQL function that returns an HTML fragment for the attributes of an HTML element.
parameter:
  path: element
  datatype: anyURI
  description: An HTML element in an HTML document.
prefixes: HTML vocabulary
return type: string
select: select ?result { optional { # Get the HTML attributes for this element, if there are any. select $element (group_concat(distinct ?attributeFragment) as ?attributeFragments) { $element ?attribute ?value. ?attribute a/rdfs:subClassOf* dom:Attribute; ?localName ?key. ?localName rdfs:subPropertyOf dom:localName. bind(concat(?key,'="',str(?value),'"') as ?attributeFragment) } group by $element } bind(coalesce(?attributeFragments, '') as ?result) }

the getMemberIndex() function
type: SPARQLFunction
definition: A SPARQL function that returns the sibling index of a node in an HTML document.
parameter: the getMemberIndex parameter
prefixes: HTML vocabulary
return type: integer
select: select(?index as $return) { bind(strafter(str($property), concat(str(rdf:),'_')) as ?after) bind(xsd:integer(?after) as ?index) filter(isIRI($property) && ?index > 0 && ?after = str(?index)) }

the getMemberIndex parameter
type: Parameter
definition: A SHACL parameter
class: ContainerMembershipProperty
order: 1
path: property

the isMembershipProperty() function
type: SPARQLFunction
definition: A SPARQL function that returns a boolean value based on whether a property is or is not an instance of the ContainerMembershipProperty class.
parameter: the isMembershipProperty parameter
prefixes: HTML vocabulary
return type: boolean
select: select $return { bind(strafter(str($term), concat(str(rdf:),'_')) as ?after) bind(xsd:integer(?after) as ?index) bind(coalesce(isIRI($term) && ?index > 0 && ?after = str(?index), false) as $return) }

the isMembershipProperty parameter
type: Parameter
definition: A SHACL parameter
class: Resource
order: 1
path: term