The tag name tag helper modifies an element's tag name if it is different from the source tag name.

Usage

The tag name tag helper can be applied to any HTML element by adding the rx-tagname attribute. If the specified tag name is non-whitespace and different from the source HTML tag name, the tag name will be modified. The tag helper does not have any other attributes.

Examples

<body>
    <h2 rx-tagname="@Model.Content.HeaderStyle">This is the header<h2>
</body>