As a web developer you are expected to be fluent in many langugaes and frameworks. It is literally impossible to learn everything a language has to offer and easy to find yourself not utilizing the full potential of the language.
HTML is usually the first language most web developers learn but it’s very rare that you learn all the available tags, we mostly stick to the most commonly used ones. Today i will be looking at some obscure but very useful HTML tags.
The <acronym> tag is a way to define or further explain a group of words. When you hover over text that has the <acronym> tag used, a box appears below with the text from the title tag. For example:
<p>The microblogging site <acronym title="Founded in 2006"> Twitter</acronym> has recently struggled with downtimes.</p>
2. <ins> and <del>
If you want to display editing revisions with markup, <ins> and <del> are just the ticket. Like the name implies, <ins> highlights what’s been added to the document with an underline, and <del> shows what’s been taken out with a strikethrough.
John <del>likes</del> <ins>LOVES</ins> his new iPod.
The <abbr> tag is similar to the <acronym> tag, except the <abbr> tag is only used to define abbreviated words. Just like <acronym>, you define a title within the tag. When a visitor hovers over the abbreviated text, the full definition appears below. The <abbr> tag is rarely used, but the benefits are many for screen readers, spellcheckers and search engines.
<abbr title="Sergeant">Sgt.</abbr> Pepper's Lonely Hearts Club is my favorite album.
The <wbr> tag is an incredibly obscure tag. To be honest, I doubt you have come into contact with the tag, as it’s hardly ever used. Essentially, the tag allows you to specify a place where you think a line break might be useful, but only if needed. This tag is unique as it relies on the discretion of the browser to insert the linebreak, if needed. It’s perfect for creating layouts that you want to avoid having horizontal scrollbars.
<span>How do you say Supercalifragilistic<wbr>expialidocious?</span>
The <base> tag specifies the base URL/target for all relative URLs in a document. There can be at maximum one <base> element in a document, and it must be inside the <head> element. If the <base> tag is present, it must have either an href attribute or a target attribute, or both.
<base href="https://www.w3schools.com/images/" target="_blank">
These are just some of the more obscure but very useful HTML tags. If you know of any other HTML tags that should be here share them in the comment section.