Using HTML
10
How to use HTML to customize the structure of your book
plain
2021-03-20T16:47:39-07:00
Introducing the Source Code Editor
The content editor allows you to toggle between the rich-text editor and the HTML source code editor. To switch to the HTML source code editor, click the “Source” button on the far left side of the editing toolbar.
After clicking the “Source” button, the text field should change so that the active HTML element is highlighted in blue. There should also be a narrow margin to the left of the code that will display downward-pointing arrows corresponding to tag elements whose contents span more than one line and can be hidden.
What can you use the HTML source code editor for?
While the toolbar in the rich-text editor provides basic functionality, the HTML code can be manipulated to accomplish things that are not available in the rich-text editor toolbar options. You can use it to refine the structure of your page and the semantic relationship between elements as well as format text in additional ways.
Description List
One example is the HTML description list element, which is not on the rich-text editor toolbar. The description list element can be used to format lists of definitions for terms used on a page or throughout the entire book.
Strikethrough, Superscript, Subscript
You can also use HTML to format text with strikethrough, superscripts (for ordinals in dates, exponents, or notes), or subscripts (for logarithmic bases, chemical formulas, etc.).
Accessibility Features
Another important functionality that the HTML source code editor can provide is tooltips for hyperlinks using the “title” attribute. This will improve the accessibility of your content.