Hello friends today we gonna learn about HTML Features You Have Never Heard Off. So read this article, HTML Features You Have Never Heard Off step by step so you may understand it in a better way. If you have query related to same article you may contact us. So Lets begin:
Guide: HTML Features You Have Never Heard Off
For a language so simple and easy to learnHTML certainly offers one unexpected amount useful featuresmany of us don’t even know about. It’s hard to keep up with time and you might think that all “you might not know” articles should be about the most recent tags, HTML has some too very helpful features that have been around for a while
From checking spelling to adding keyboard shortcuts, I’ll show you in this article five lesser known HTML featuresback to menu ↑
1. Check spelling as you type
The spell check attribute prompts browsers to check spelling while a user types an element. This attribute is global, which means, you can add it to any HTML tag
However, it only works on elements that can take text inputHaving it global is useful because it can be inherited by childrenFor example, add it to a
The spell check continues to work all text typing: text, search, url and e-mail. It also works on (elements with contenteditable attribute).
The value can be an empty string, true or false. The empty string and the true will turn on spell check
Type something here
In the above code, both the
tags will check spelling when a user types them in.
If the user has spell check disabled the spelling is not checked in the browser settings, even if the spell check has been addedback to menu ↑
2. Be safe from compromised CDN sources
It is quite common to host resources, such as scripts and stylesheet files, through CDNs. But if it CDN is being compromised, that includes those hosted files, and if a retrieved resource on your website is compromised, so will your site!
Read what Mozilla Developer Network says about the issue:
… the use of CDNs also carries a risk, in the sense that if an attacker gains control of a CDN, the attacker could inject arbitrary malicious content into files on the CDN (or replace the files completely) and thus may also attack any sites that fetch files from that CDN.
To prevent this, Subresource Integrity (SRI) was initially introduced by W3C. This arrangement compares the hash value (the result of applying a hash function to an input) of a resource to validate it.
Now when a web page from your site with the above code example.js, the browser needs to load first applies the hash function, and only loads and runs example.js if the hash value matches the integrity value
If example.com has been compromised and example.js was interrupted with then the hash value of example.js does not match the integrity value
Most common CDNs already offer SRI integrity values, but you can also generate one here.back to menu ↑
3. Overwrite form targets when submitting buttons
You are probably familiar with the target attribute, the one who decides where a hyperlink is opened, for example on the same page or in a new tab. You may also know that the same target attribute used in the