[Table of Contents] [docx version]

WordprocessingML Reference Material - Table of Contents

highlight (Text Highlighting)

This element specifies a highlighting color which is applied as a background behind the contents of this run.

If this run has any background shading specified using the shd element (§2.3.2.30), then the background shading shall be superseded by the highlighting color when the contents of this run are displayed.

If this element is not present, the default value is to leave the formatting applied at previous level in the style hierarchy. If this element is never applied in the style hierarchy, then text highlighting shall not be applied to the contents of this run.

[Example: Consider a run within a paragraph which has run shading applied as well as yellow text highlighting using the highlight element. This formatting is specified using the following WordprocessingML:

<w:rPr>

  <w:highlight w:val="yellow" />

  <w:shd w:themeFill="accent2" w:themeFillTint="66" />

</w:rPr>

The resulting run would have yellow highlighting visible over its contents, as the highlighting supersedes the shading for the contents of the run. end example]

Parent Elements

rPr2.7.8.1); rPr2.3.1.29); rPr2.5.2.26); rPr2.3.2.25); rPr2.3.2.26); rPr2.7.4.4); rPr2.3.1.30); rPr2.9.26); rPr2.5.2.27); rPr2.7.5.2)

 

Attributes

Description

val (Highlighting Color)

Specifies the color of the text highlighting which shall be applied to the contents of this run.

 

[Example: Consider a text run which shall be displayed with colored text highlighting. This highlighting would be specified using the following WordprocessingML:

 

<w:rPr>

<w:highlight w:val="red" />

</w:rPr>

 

The resulting text highlighting would be red, as this is the color specified by the val attribute. end example]

 

The possible values for this attribute are defined by the ST_HighlightColor simple type2.18.46).

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_Highlight">

   <attribute name="val" type="ST_HighlightColor" use="required"/>

</complexType>