> For the complete documentation index, see [llms.txt](https://docs.yarnspinner.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yarnspinner.dev/2.1/api/csharp/yarn.markup/yarn.markup.markupattribute.md).

# MarkupAttribute

Struct in [Yarn.Markup](/2.1/api/csharp/yarn.markup.md)

Inherits from `System.ValueType`

## Summary

Represents a range of text in a marked-up string.

```csharp
public struct MarkupAttribute
```

## Remarks

You do not create instances of this struct yourself. It is created by objects that can parse markup, such as [Dialogue](/2.1/api/csharp/yarn/yarn.dialogue.md) .

## Methods

| Name                                                                                                          | Description |
| ------------------------------------------------------------------------------------------------------------- | ----------- |
| [ToString()](/2.1/api/csharp/yarn.markup/yarn.markup.markupattribute/yarn.markup.markupattribute.tostring.md) |             |

## Properties

| Name                                                                                                            | Description                                                                    |
| --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| [Length](/2.1/api/csharp/yarn.markup/yarn.markup.markupattribute/yarn.markup.markupattribute.length.md)         | Gets the number of text elements in the plain text that this attribute covers. |
| [Name](/2.1/api/csharp/yarn.markup/yarn.markup.markupattribute/yarn.markup.markupattribute.name.md)             | Gets the name of the attribute.                                                |
| [Position](/2.1/api/csharp/yarn.markup/yarn.markup.markupattribute/yarn.markup.markupattribute.position.md)     | Gets the position in the plain text where this attribute begins.               |
| [Properties](/2.1/api/csharp/yarn.markup/yarn.markup.markupattribute/yarn.markup.markupattribute.properties.md) | Gets the properties associated with this attribute.                            |

## See Also

* [Dialogue.ParseMarkup(string)](/2.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.parsemarkup.md): Parses a line of text, and produces a [MarkupParseResult](/2.1/api/csharp/yarn.markup/yarn.markup.markupparseresult.md) containing the results.
