# span

> phone 12+ | 2in1 13+ | tablet 12+ | tv 19+ | wearable 18+

作为<[text](https://developer.huawei.com/consumer/cn/doc/harmonyos-references/js-service-widget-basic-text)>子组件提供文本修饰能力。
> 说明
>
> 从API version 8 开始支持。后续版本如有新增内容，则采用上角标单独标记该内容的起始版本。

## 子组件

> phone | 2in1 | tablet | tv | wearable

不支持。

## 属性

> phone | 2in1 | tablet | tv | wearable

支持[通用属性](https://developer.huawei.com/consumer/cn/doc/harmonyos-references/js-service-widget-common-attributes)。

## 样式

> phone | 2in1 | tablet | tv | wearable

|名称|类型|默认值|必填|描述|
|:--------------|:--------------|:---------|:-|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|color|<color>|-|否|设置文本段落的文本颜色。|
|font-size|<length>|16px|否|设置文本段落的文本尺寸。|
|font-style|string|normal|否|设置文本段落的字体样式，见[text组件font-style的样式属性](https://developer.huawei.com/consumer/cn/doc/harmonyos-references/js-service-widget-basic-text#样式)。|
|font-weight|number | string|normal|否|设置文本段落的字体粗细，见[text组件font-weight的样式属性](https://developer.huawei.com/consumer/cn/doc/harmonyos-references/js-service-widget-basic-text#样式)。|
|text-decoration|string|none|否|设置文本段落的文本修饰，见[text组件text-decoration样式属性](https://developer.huawei.com/consumer/cn/doc/harmonyos-references/js-service-widget-basic-text#样式)。|
|font-family|string|sans-serif|否|设置文本段落的字体列表，用逗号分隔，每个字体用字体名或者字体族名设置。列表中第一个系统中存在的或者通过[自定义字体](https://developer.huawei.com/consumer/cn/doc/harmonyos-references/js-service-widget-common-customizing-font)指定的字体，会被选中作为文本的字体。|

## 事件

> phone | 2in1 | tablet | tv | wearable

不支持。

## 示例

> phone | 2in1 | tablet | tv | wearable

详见[text示例](https://developer.huawei.com/consumer/cn/doc/harmonyos-references/js-service-widget-basic-text#示例)。

