> For the complete documentation index, see [llms.txt](https://playermaker.gitbook.io/componentbuilder/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://playermaker.gitbook.io/componentbuilder/english/html-attribute/htmltagattribute.md).

# HtmlTagAttribute

Use `HtmlTagAttribute to define html tag name for component`

> NOTE: This is ONLY for component class

```csharp
[HtmlTag("a")]
public class Anchor : BlazorComponentClass { }
```

Override `GetTagName() method to output HTML tag name with customization code`

```csharp
public class AnchorButton : BlazorComponentBase
{
    protected override void GetTagName()
    {
        if(Condition)
        {
            return "button";
        }
        return "a";
    }
}
```

```cshtml
<Component Condition/>
<button>...</button>

<Component/>
<a>....</a>
```
