.. _HTML Components:
#################################
HTML Components
#################################
To add an HTML component to your course, you create both XML and HTML files.
See:
* `Create the XML File for an HTML Component`_
* `HTML Component XML File Elements`_
* `html Element Attributes`_
* `Example HTML Component XML File`_
* `Create the HTML File for an HTML Component`_
* `Example HTML Component Content`_
Both files, for each component, must be in the ``html`` directory.
*********************************************
Create the XML File for an HTML Component
*********************************************
You create an XML file in the ``html`` directory for each HTML component in your course.
The name of the XML file must match the value of the @url_name attribute of the ``html`` element in the vertical XML file.
For example, if the vertical XML file contains:
.. code-block:: xml
. . .
You create the file ``html/Introduction.xml`` to define the HTML component.
*************************************
HTML Component XML File Elements
*************************************
The root element of the XML file for the HTML component is file is ``html``.
The ``html`` element contains not children.
*************************************
``html`` Element Attributes
*************************************
.. list-table::
:widths: 10 70
:header-rows: 1
* - Attribute
- Meaning
* - ``display_name``
- The value that is displayed to students as the name of the HTML
component.
* - ``file_name``
- The name of the HTML file that contains the content for the HTML
component, without the ``.HTML`` extension.
*************************************
Example HTML Component XML File
*************************************
The following example shows an XML file for an HTML component:
.. code-block:: xml
*********************************************
Create the HTML File for an HTML Component
*********************************************
You create an HTML file in the ``html`` directory for each HTML component in your course.
The name of the HTML file must match the value of the @file_name attribute of the ``html`` element in the component's XML file.
For example, if the component's XML file contains:
.. code-block:: xml