This article discusses some basic HTML guidelines for creating better forms. It deals with HTML tags & attributes that can help user to fill the form better.
The referring url may compromise user privacy when a link is clicked. However this can be prevented through the referrer meta tag, or using the referrerpolicy attribute on hyperlinks.
The <output> tag is the standard HTML element in which the result of any user action or calculation performed can be shown. The result can inserted inside the tag using Javascript.
HTML videos can be lazily loaded using the preload attribute of the 〈video〉element. preload="none" needs to be set to disable pre-loading of the video.
The "decoding" attribute can be included for an <img> tag to specify whether to decode the image in parallel or along with the rest of the page content.
A stylesheet can include the disabled attribute in its markup to prevent it from being downloaded on page load. Later when the stylesheet needs to loaded on demand, its disabled attribute can be removed with Javascript.
To prevent situations where we would not like the browser to autofill the password field in a form, the autocomplete=new-password attribute can be used.
Click to Call functionality in web pages can be implemented using the tel: schema inside a hyperlink. Clicking on such a link would open the Dialer App on the device.
The Constraint Validation API validates HTML forms on page load, and while typing on an input field. This seemingly confusing behavoiur to the user can be modified using a bit of CSS and Javascript.
The HTML <address> element represents address information for the webpage. It can be read by machines and scripts for understanding that the included content is an address of some sort.
The HTML <mark> element can be used to highlight text of special relevance in a webpage. This tag can be read by machines, bots, screen readers etc to use the highlighted for their learning purposes.
The <caption> tag is used to give a caption or title to HTML tables. This is the correct way of giving a title to a table as per the HTML specification.
The HTML inputmode attribute can be used for textboxes in a webpage. This can effectively customize the onscreen keyboard taking in the mind the data to be filled for the textbox - telephone, email, numbers etc.
The <abbr> element is the standard markup element used to highlight abbreviated terms in a webpage. A title attribute can also provide the full description of the abbreviation.