Skip to main content

Wordprocessing Text

Text Shading and Highlight

There are a few text properties related to shading and highlight of text. Each is applied with child elements within the <rPr> element.

Elements:​

ElementDescription
shdSpecifies the shading for the contents of the run: <w:shd w:val="pct10" w:fill="00FFFF" w:color="FF0000"/>. Shading consists of three components: background color, an optional pattern, and an optional pattern color. The resulting shading is applied by first setting the background color, then applying the pattern and pattern color.
highlightSpecifies a highlighting color to be applied as background behind the contents: <w:highlight w:val="red"/> This element will supersede any background shading specified in shd.
<div>Then they start and tremble, <span style="background-color:#FFFF00">
they call us by our name</span>, and as soon as we have recognized their voice the spell is broken. We have delivered them.</div>

CSS Example:

Then they start and tremble, they call us by our name, and as soon as we have recognized their voice the spell is broken. We have delivered them.