© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
A. FreemanPro ASP.NET Core 6https://doi.org/10.1007/978-1-4842-7957-1_25

25. Using Tag Helpers

Adam Freeman1  
(1)
London, UK
 
Tag helpers are C# classes that transform HTML elements in a view or page. Common uses for tag helpers include generating URLs for forms using the application’s routing configuration, ensuring that elements of a specific type are styled consistently, and replacing custom shorthand elements with commonly used fragments of content. In this chapter, I describe how tag helpers work and how custom tag helpers are created and applied. In Chapter 26, I describe the built-in tag helpers, and in Chapter 27, I use tag helpers to explain how HTML ...

Get Pro ASP.NET Core 6: Develop Cloud-Ready Web Applications Using MVC, Blazor, and Razor Pages now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.