1e41f4b71Sopenharmony_ci# span
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci
4e41f4b71Sopenharmony_ciThe **\<span>** component is a child component of [\<text>](js-service-widget-basic-text.md) and is used as a text modifier.
5e41f4b71Sopenharmony_ci
6e41f4b71Sopenharmony_ci
7e41f4b71Sopenharmony_ci> **NOTE**
8e41f4b71Sopenharmony_ci>
9e41f4b71Sopenharmony_ci> The APIs of this module are supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
10e41f4b71Sopenharmony_ci
11e41f4b71Sopenharmony_ci## Child Components
12e41f4b71Sopenharmony_ci
13e41f4b71Sopenharmony_ciThe child component **[\<span>](js-service-widget-basic-span.md)** is supported.
14e41f4b71Sopenharmony_ci
15e41f4b71Sopenharmony_ci
16e41f4b71Sopenharmony_ci## attributes
17e41f4b71Sopenharmony_ci
18e41f4b71Sopenharmony_ciThe [universal attributes](js-service-widget-common-attributes.md) are supported.
19e41f4b71Sopenharmony_ci
20e41f4b71Sopenharmony_ci
21e41f4b71Sopenharmony_ci## Styles
22e41f4b71Sopenharmony_ci
23e41f4b71Sopenharmony_ci| Name| Type| Default Value| Mandatory| Description|
24e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | -------- |
25e41f4b71Sopenharmony_ci| color | &lt;color&gt; | - | No| Font color of the modified text.|
26e41f4b71Sopenharmony_ci| font-size | &lt;length&gt; | 16px | No| Font size of the modified text.|
27e41f4b71Sopenharmony_ci| font-style | string | normal | No| Font style of the modified text. For details, see **font-style** of the [**\<text>**](js-service-widget-basic-text.md#styles) component.|
28e41f4b71Sopenharmony_ci| font-weight | number \| string | normal | No| Font weight of the modified text. For details, see **font-weight** of the [**\<text>**](js-service-widget-basic-text.md##styles) component.|
29e41f4b71Sopenharmony_ci| text-decoration | string | none | No| Text decoration of the modified text. For details, see **text-decoration** of the [**\<text>**](js-service-widget-basic-text.md#styles) component.|
30e41f4b71Sopenharmony_ci| font-family | string | sans-serif | No| Font family, in which fonts are separated by commas (,). Each font is set using a font name or font family name. The first font in the family or the specified [custom font](js-service-widget-common-customizing-font.md) is used for the text.|
31e41f4b71Sopenharmony_ci
32e41f4b71Sopenharmony_ci
33e41f4b71Sopenharmony_ci## Events
34e41f4b71Sopenharmony_ci
35e41f4b71Sopenharmony_ciNot supported
36e41f4b71Sopenharmony_ci
37e41f4b71Sopenharmony_ci## Example
38e41f4b71Sopenharmony_ci
39e41f4b71Sopenharmony_ciFor details, see [Example of the \<text> component](js-service-widget-basic-text.md#example).
40