Generating HTML
As discussed in Chapter 1, Setting the Stage, browsers can understand only HTML, CSS, and JavaScript, irrespective of the technology that you use to build the web application. This holds true when building the application in ASP.NET MVC as well.
Most applications get the user input, process the input, and then store the required information in the database to retrieve it later. In the context of web applications, HTML form elements are used to get user input.
The HTML Helpers and Tag Helpers are a couple of ways to generate HTML elements in ASP.NET Core.
HTML helpers are server-side methods that aid in the generation of HTML elements that can be understood by browsers. HTML helpers were the primary method of generating HTML elements up until ASP.NET MVC 5.
Tag Helpers, introduced in ASP.NET Core, also produce HTML elements. Tag Helpers, which we will discuss in a later section of this chapter, look just like HTML elements, where you add attributes to identify them as Tag Helpers...