The 9 Content Objects of HTML
A Content Object inserts non-textual information within a Content Block
Vector Image
A Vector Image embeds a scalable graphic resource
The syntax is an svg
element with the following attributes and child elements:
-
Zero or one count for each attribute defined in the SVG namespace.
-
Zero or one count for each Global Attribute
-
Zero or more counts for each element defined in the SVG namespace.
<svg></svg>
Raster Image
A Raster Image inserts an unscalable graphic resource
The syntax is a void img
element with the following attributes:
-
One
src
attribute -
Zero or one count for each of the following attributes:
alt
,crossorigin
,decoding
,fetchpriority
,height
loading
,referrerpolicy
,sizes
,srcset
,usemap
, andwidth
. -
One
sizes
attribute if thesrcset
attribute has a value that includes a width descriptor -
Zero or one
sizes
attribute with anauto
value if the following conditions are met:-
There's no
srcset
attribute -
The
loading
attribute has alazy
value
-
-
Zero or one
ismap
if there's an ancestora
element with anhref
attribute. -
Zero or one count for each Global Attribute
<img src="[url]">
Note: Each Raster Image may have a set of alternatives via a picture
element or a set of clickable areas via a Map Card
Audio Media
An Audio Media inserts a sound resource
The syntax is an audio
element with the following attributes and child elements:
-
Zero or one count for each of the following attributes:
autoplay
,controls
.crossorigin
,muted
,loop
,preload
, and
src
. -
Zero or one count for each Global Attribute
-
The following order of elements:
-
Zero or more
source
elements if there is nosrc
attribute -
Any order of the following element variants:
-
Zero or one
track
element with adefault
attribute and akind
attribute having acaptions
keyword or achapters
keyword -
Zero or one
track
element with adefault
attribute and akind
attribute having adescriptions
keyword -
Zero or one
track
element with adefault
attribute and akind
attribute having achapters
keyword -
Zero or more
track
elements
-
-
Zero or one count for each element allowed in the parent of this
audio
element. But, it must exclude descendant of each of the following elements:audio
andvideo
. Those elements acts as fallback content when theaudio
element is not supported by a user agent
-
<audio></audio>
Video Media
A Video Media insert moving images with or without a sound resource
The syntax is a video
element with the following attributes and child elements:
-
Zero or one count for each of the following attributes:
-
Zero or one count for each of the following attributes:
autoplay
,controls
.crossorigin
,height
, attributes.loop
,muted
,playsinline
attribute,poster
attribute,preload
, and
src
.width
, and -
Zero or one count for each Global Attribute
-
The following order of elements:
-
Zero or more
source
elements if there is nosrc
attribute -
Any order of the following element variants:
-
Zero or one
track
element with adefault
attribute and akind
attribute having acaptions
keyword or achapters
keyword -
Zero or one
track
element with adefault
attribute and akind
attribute having adescriptions
keyword -
Zero or one
track
element with adefault
attribute and akind
attribute having achapters
keyword -
Zero or more
track
elements
-
-
Zero or more counts for each element allowed in the parent of this
video
element. But, it must exclude descendant of each of the following elements:audio
andvideo
. Those elements acts as fallback content when theaudio
element is not supported by a user agent
-
<video></video>
Math Document
A Math Document embed mathematical notations
The syntax is a math
element with the following attributes and child elements:
-
Zero or one count for each attribute defined in the Math namespace.
-
Zero or one count for each Global Attribute
-
Zero or more counts for each element defined in the Math namespace.
<math></math>
Web Document
A Web Document inserts a navigable resource
The syntax is an iframe
element with the following attributes and child elements:
-
Zero or one count for each of the following attributes:
allow
,allowfullscreen
,height
,loading
,referrerpolicy
,srcdoc
,sandbox
,src
, andwidth
. -
Zero or one count for each Global Attribute
<iframe></iframe>
General Document
A General Document inserts other document types but as image if not supported by the user agent
An Object Document relates a resource other than a Raster Image, an Audio Media, a Video Media, or a Web Document
The syntax is an object
element with the following attributes and child elements:
-
One
data
attribute -
Zero or one count for each of the following attributes:
form
,height
name
,type
, andwidth
. -
Zero or one count for each Global Attribute
-
Zero or one count for each element allowed in the parent of this
object
element
<object data="[URL]"></object>
Embed Medium
An Embed Medium provides an integration point for plugins to insert a document
The syntax is an embed
element with the following attributes:
-
Zero or one count for each of the following attributes:
height
,src
,type
, andwidth
. -
Zero or one count for each Global Attribute
<embed>