.. _HTML Components: ################################# HTML Components ################################# .. contents:: :local: :depth: 1 ********************************************* Create the HTML Component ********************************************* To add an HTML component to your course, you can embed the XML for it in the parent XML file, or split it up into either 1 or 2 additional files. You can break up the HTML configuration into an .xml file in the html directory and an additional .html file in the same directory. .. caution:: If you are including HTML that is not valid HTML, you must break out HTML content in a separate file. ***************************************************** Example of an HTML Component Embedded in a Vertical ***************************************************** .. code-block:: xml ... The above has an error. x should be y in the second equation. ********************************************* Example of Separate HTML Files ********************************************* You create an XML file in the ``html`` directory for the content that you choose to break out into separate HTML files. 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, a vertical XML file contains the following url_name. .. 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``. In this case, the ``html`` element contains no children. ************************************* ``html`` Element Attributes ************************************* .. list-table:: :widths: 10 70 :header-rows: 1 * - Attribute - Meaning * - ``display_name`` - Required. The value that is displayed to students as the name of the HTML component. If you do not supply a ``display_name`` value, "html" is supplied for you. * - ``filename`` - 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 ************************************* Example HTML Component Content ************************************* In the component's HTML file, you add valid HTML to represent the content you want to be displayed to students. For example, the following is from an HTML file for the edX Demo course: .. code-block:: html

Lesson 2: Let's Get INTERACTIVE!

InteractiveNow that you know your way around an edX course let's look at some of the exciting interactive tools you may encounter. Use the unit navigation bar above to explore.  

Once you have tried the interactive tools in this lesson, make sure to check out the week 2 homework where we show you several of the really cool interactive labs we’ve created for past courses.  They’re fun to play with.  Many courses will have tools and labs that you need to use to complete homework assignments.