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 forms are created. Table
25-1 puts tag helpers in context.