## Section43.4Online (HTML) Options

These options affect the base conversion to web pages (online, HTML). Many, but not all, will affect subsequent conversions based on HTML, such as a conversion to EPUB or Jupyter notebooks. See Chapter 29 for a more general overview of this conversion, including options that will eventually migrate here.

### Subsection43.4.1HTML Analytics

The

/publication/html/analytics


element can have the following attributes:

• @google-gst: a Google global site tag, and ID you get from Google. Do not copy the identification numbers from another project—be sure to obtain your own for your project.

• @statcounter-project, @statcounter-security: ID numbers you get from StatCounter. Do not copy the identification numbers from another project—be sure to obtain your own for your project.

Setting these attributes to non-empty strings is the signal to add the relevant code to each of the pages of your HTML output. See Section 29.7 for more.

### Subsection43.4.2HTML Base URL

The

/publication/html/baseurl/@href


attribute may be given as a complete URL for the top-level of where HTML output is hosted. Of course, this may be different for different publishers. The value is a directory, and so should end with a slash (path separator). See Subsection 29.1.4 for reasons why you might want to specify this.

### Subsection43.4.3HTML Embedded Calculator

The

/publication/html/calculator


element has the following attribute:

• @model: used to control which calculator is available on every page. Possible values are:

• geogebra-classic

• geogebra-graphing

• geogebra-geometry

• geogebra-3d

• none

The default is none. See Subsection 29.1.2 for more.

### Subsection43.4.4HTML WeBWorK Dynamism

The

/publication/html/webwork


element has the following attributes, each of which can have a value of static or dynamic:

• @inline, default value: dynamic

• @divisional, default value: static

• @reading, default value: static

• @worksheet, default value: static

• @project, default value: dynamic

The attribute names suggest the type of exercise or project-like that will be affected. See Subsection 37.4.2 for more details and the rationale for the defaults.

### Subsection43.4.5HTML ActiveCode Programming Window

The

/publication/html/calculator


element has the following attribute:

• @activecode: used to control if an ActiveCode window is available on every page, and if so, which language it undestands. Possible values are:

• python (Python)

• javascript (JavaScript)

• html (HTML)

• sql (SQL)

• c (C, Runestone server only)

• cpp (C++, Runestone server only)

• java (Java, Runestone server only)

• python3 (Python 3, Runestone server only)

• octave (Octave, Runestone server only)

• none

For a build hosted at a Runestone server, python is the default. For an HTML build hosted elsewhere, none is the default. See Subsection 29.1.3 for more.

### Subsection43.4.6HTML Index Page

The

/publication/html/index-page


element can have the following attribute:

• @ref: the @xml:id of a division which will be a complete page at whatever level the document is chunked (broken into smaller pages).

An index.html page will be created which redirects immediately to this page. Many webservers will serve this page when a URL stops with the enclosing directory. So the Table of Contents (<book>, <article>) or the <frontmatter> are common choices. See Subsection 29.1.1 for more.

### Subsection43.4.7HTML Knowlization

In a conversion to HTML a wide variety of content can be “born” in a knowl. Publisher switches are specified via multiple attributes of a single

/publication/html/knowl


element, with values of yes (do use a knowl) or no (do not use a knowl, present content normally). For example,

<knowl remark="yes"/>


would make every “remark-like” element occur as a knowl where the content is first introduced. Note that these are distinctly different than cross-reference knowls. For more detail see Section 29.2.

This table gives the various attribute names, the default value, and an indication of the elements affected. Note that some items are automatically born knowled (e.g. footnotes) and so there is no option to control that behavior. Also, items such as <figure>, when included in a <sidebyside> are not influenced by the relevant option and are not born knowled. There are four flavors of <exercise> and so four options. A <hint>, <answer>, or <solution> is automatically knowled as a plot-spoiler where the author is expecting the reader to do something. In contrast, an “example-like” is expository, so the knowlization is configurable.

### Subsection43.4.8HTML Platforms

The

/publication/html


element can have an attribute @platform with values:

• web: the default, meant for self-hosting with no server configuration, features, or assumptions

• runestone: output meant for hosting on a Runestone server (Chapter 32)

Here platform refers to the server where the HTML output will eventually be hosted. The effect is to create minor variations in the output to take advantage of extra features of the indicated platform.

### Subsection43.4.9HTML Style

The

/publication/html/css


element can have the following attributes:

• @colors: used to construct filename for CSS controlling colors.

• @knowls: used to construct filename for CSS controlling knowls.

• @toc: used to construct filename for CSS controlling the Table of Contents.

• @banner: used to construct filename for CSS controlling the banner (masthead).

In each case the default file is replaced and instead a new filename is formed from the attributes value. For example, the specification

<css colors='bright_red'/>


will cause a CSS file named colors_bright_red.css to replace colors_default.css. The server in use can be configured separately. See Section 29.6 for more.

2019-12-08: at this time we recommend experimenting with only one file at a time.

### Subsection43.4.10HTML Search

The

/publication/html/search


element can have the following attributes:

• @variant: a string specifying how search queries are handled. Possible values are default and none. The default value is…default. This is search provided natively.

• @google-cx: a Google cx number, gained from configuring search for a site. Setting this attribute to a non-empty string is the signal to add the relevant code for a search box in the masthead.

Note that if you elect both native search and Google search the two search boxes will overlay each other and one will not be usable. See Section 29.8 and Section 29.9 (respectively) for more.

### Subsection43.4.11HTML Video Embedding

The

/publication/html/video


element can have the following attribute:

• @privacy: allowed values are yes or no.

Setting this to yes (the default) prevents certain tracking cookies from being used. Currently only supported for videos from YouTube. See Subsection 29.1.5 for more.

The

/publication/html


element can have an attribute @short-answer-responses with values:

• graded: the default, only show an area for responses when they can be graded or scored (such as when hosted on Runestone, Chapter 32).

• always: include an editable response area, even if it cannot be submitted for feedback.

See Subsection 4.12.9 for details.

The

/publication/html/navigation


element can have the following attributes:

• @logic with values linear (default) and tree.

• @upbutton with values yes (default) and no.

• @style with values full (default) and compact.

See Subsection 29.1.7 for explanations and details.