script

script statements, which may include CDATA sections

Element Information

Model

Attributes

QName Type Fixed Default Use Inheritable Annotation
charset Charset optional
defer restriction of xs:token optional
id xs:ID optional
src URI optional
type ContentType required
xml:space restriction of xs:NCName preserve optional

Used By

Element Groups head.misc, misc.inline

Source

<xs:element name="script">
  <xs:annotation>
    <xs:documentation>script statements, which may include CDATA sections</xs:documentation>
  </xs:annotation>
  <xs:complexType mixed="true">
    <xs:attribute name="id" type="xs:ID"/>
    <xs:attribute name="charset" type="Charset"/>
    <xs:attribute name="type" use="required" type="ContentType"/>
    <xs:attribute name="src" type="URI"/>
    <xs:attribute name="defer">
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="defer"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute ref="xml:space" fixed="preserve"/>
  </xs:complexType>
</xs:element>

Sample