A More Semantic Way of Describing Emphasized Inline Content in DITA 2.0

strong and em elements for DITA 2.0

The DITA 2.0 specification is still a work in progress by the members of the OASIS DITA Technical Committee (which includes me), but it is inching ever-nearer to release. At the time of writing (early March 2022), pretty much all of the proposals for what will go into the new standard have been made, and everything is being methodically reviewed.

One thing that has always bugged me with DITA 1.x is the lack of a semantic equivalent to the bold (b) and (i) elements. This is pretty much a holdover from the early days of HTML, where these tags originally appeared and were popularized. And I mean early since the more semantic equivalents to the bold and italics elements—strong and em respectively—were introduced all the way back with the HTML 3.2 standard back in 1997. Considering that DITA 1.0 came out in 2005, it seemed like an oversight that strong and em weren’t added to the original specification. While none of this is ultimately a big deal, whenever I was teaching about the semantic nature of DITA, inevitably there would be a student who would ask about the b and i elements, and why wasn’t there a semantic equivalent, like the elements that already exist in HTML?

This is what led to my proposal to add the strong and em elements to DITA 2.0.

Originally, I was thinking that it made sense to deprecate the old, non-semantic b and i elements in favor of strong and em, but I was quickly convinced by other members of the DITA Technical Committee that it made more sense to retain them and redefine how they are used. That way there would be additional choices for people in the tags that they use for different purposes. And since the b and i elements are still around and valid in DITA 2.0, retaining them would not automatically make them years of accumulated DITA 1.x content obsolete overnight. After much debate, the strong and em elements were added to a new domain called “emphasis” instead of awkwardly trying to lump them in with the existing typographic elements.

For the final proposal I put together, I ended up coming up with extended definitions and several examples to make it clear how strong and em ought to be used, and the same for the redefined b and i elements. When it came to the review process for all of these elements though, the descriptions and examples were stripped back to the bare minimum. This is apparently in line with how the specification is written.

But for those who may be looking for future direction on what I had in mind when defining the new elements and redefining the old ones, this blog post is for you. If you want to dig into even more detail, like the draft DTDs defining the new elements, see the full Stage 3 proposal I submitted (available in DITA XML).

While there’s no need to follow the guidelines I set out below, I am hoping that if you are working on a style guide for DITA 2.0 tag usage, you may find the following information useful.

The strong element

Strong text can be used to indicate content that is considered to be important or serious, or that has some form of urgency.

Typically, its content will be rendered in bold at output. Use this only when something more semantically appropriate is not available. For example, for a specific warning, consider using something from the hazard statement domain, such as <hazardstatement>.

strong is part of the emphasis domain. The addition of strong brings DITA more into alignment with its equivalent in the current HTML specification.

The following examples show how it can be used.

Emphasizing an important detail:

<p>Your doctor prescribed this medicine to treat an infection. It is important that you <strong>take all of the medicine</strong> as described.</p>

Another example:

<p>When starting a car with keyless ignition, you must <strong>step on the brake pedal</strong> before pressing the start button.</p>

Underscoring a serious point:

Use the word <em>very</em> <strong>sparingly</strong>. Where emphasis is necessary, use words strong in themselves.

Pointing out a critical/urgent detail:

<p>SERVICE HEADLIGHT—<strong>Black</strong> wire with <strong>red tracer</strong> from handlebar toggle switch to large terminal screw; <strong>red</strong> wire with <strong>yellow tracer</strong> from handlebar toggle switch to small terminal screw.</p>

The em element

Emphasized text (em) is used to indicate stress or to otherwise highlight content.

A stress emphasis is designed to change the meaning of a phrase or sentence or stress the importance of a particular noun, verb, or adjective. Typically, its content will be rendered in italics at output. Use this only when a more semantically appropriate equivalent is not available. For example, indicating a different mood or voice, i may be more relevant.

Emphasizing meaning within a sentence:

<p>What was previously called <em>block-level</em> content up to HTML 4.1 is now called <em>flow</em> content in HTML5.</p>

Stressing the importance of a noun within a sentence:

<p>A <em>condenser</em> is an apparatus for condensing a large quantity of electricity on a comparatively small surface.</p>

Stressing the importance of a verb or actions within a sentence:

To remove a message from a pigeon, first <em>catch</em> the bird, then <em>hold</em> it in one hand, <em>extend</em> its leg, and <em>remove</em> the message holder with the other hand.

Stressing the importance of an adjective or adjectival phrase within a sentence:

<p>A good plan once adopted and put into execution <em>should not be abandoned</em> unless it becomes clear that it can not succeed.</p>

em is part of the emphasis domain. The addition of em brings DITA more into alignment with its equivalent in the current HTML specification.

Redefining the b Element

Bold text is used to draw attention to a word or phrase for utilitarian purposes without implying that there is any extra importance.

There is also no implication of an alternate voice or mood, or that its content should be actionable. For example, it can be used to indicate product names within a review, highlighting roles within a process, or for use in spans of text where the typical presentation is expected to be in boldface.

Redefining b in this manner brings DITA more into alignment with its equivalent in the current HTML specification.

b can be used to indicate a product name within a review:

<p>One of the best features of <b>Mr. Flip-it</b> is its ability to manipulate objects within a three-dimensional space so that you can see the other side.</b>

b can also be used to highlight related concepts within a topic:

<p>The <b>Solid Waste Operations Manager</b> plans and manages the countywide transfer station and landfill operations, coordinates solid waste processing operations with the planning and engineering staff, and performs related duties as required.</p>
[... Lots of intervening text.]
><p>The <b>Sanitation Engineer</b> creates strategies for landfill sites that minimize the impact on the environment.</p>

b can also be used in situations where boldfaced text is expected for stylistic purposes, such as when the house style for an article lede is to be rendered in boldface:

<p><b>Know where to get help.</b>
Before proceeding to wrangle your first ostrich, ensure you know the location of the closest first aid station.</p>

Redefining the i Element

Italic text is used to indicate either an alternate voice or mood or to otherwise offset it from the content around it to indicate a different quality of text.

Redefining i in this manner brings DITA more into alignment with its equivalent in the current HTML specification.

i can be used for indicating text in a different voice, such as when foreign words or phrases are used:

<note type="caution">Even highly experienced operators of heavy machinery should remain alert for dangerous situations. Having a <i>laissez-faire</i> attitude is a recipe for disaster.</note>

i can also be used to indicate different character voices:

<p><i>Edgar</i>: I know thee well—a serviceable villain, as duteous to the vices of thy mistress as badness would desire.</p>
<p><i>Gloucester</i>: What, is he dead?</p>

It can also be used to indicate a taxonomic designation:

<p>When wrangling ostriches (<i>Struthio camelus</i>) people are advised that while they are a type of bird (Class: <i>Aves</i>), they are thought to be descendants of their extinct dinosaur (Suborder: <i>Theropoda</i>) relatives and share the same type of temperament.</p>

i can also be used to designate the name of a ship:

<p>The <i>MV Rena</i> was a container ship that ran aground near Tauranga, New Zealand, resulting in an oil spill.</p>

About

"DITAWriter" is Keith Schengili-Roberts. I work for AMD as a Senior Manager for Technical Documentation, and have recently helped usher in a new company-wide DITA-based CCMS. And I like to write about DITA and the technical writing community. To get ahold of me you can email me at: keith@ditawriter.com.

View all posts by