# MarkupAttribute

Struct in [Yarn.Markup](/2.0/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.0/api/csharp/yarn/yarn.dialogue.md) .

## Methods

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

## Properties

| Name                                                                                                            | Description                                                                    |
| --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| [Length](/2.0/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.0/api/csharp/yarn.markup/yarn.markup.markupattribute/yarn.markup.markupattribute.name.md)             | Gets the name of the attribute.                                                |
| [Position](/2.0/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.0/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.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.parsemarkup.md): Parses a line of text, and produces a [MarkupParseResult](/2.0/api/csharp/yarn.markup/yarn.markup.markupparseresult.md) containing the results.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.yarnspinner.dev/2.0/api/csharp/yarn.markup/yarn.markup.markupattribute.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
