Some HTML elements that not enough people are using.
See part one here , or watch a video covering part one here.
s
element
The strikethrough element is used to show information that is no longer relevant, and by default, is styled with a line running through the text.
One example would be a price that has been marked down.
Purchase today for
$39.99
$19.99!
del
and
ins
elements
While strikethrough is used to show information that is no longer relevant, while the default styling is the same, we use the deleted text element to show text that has been deleted from a document.
This pairs nicely with the inserted text element , which is to show new text which has been inserted into a document.
A nice example that you would probably be familiar with is a github pull request , which often has both.
wbr
element
The line break opportunity element is one that you might not use very often, but can come in handy when you have large font-sizes, or very long words.
A heading with a particuÂlarly long word can cause issues
That said, being so manual, using
&shy
might be a better choice, if you want hyphenation.
fieldset
and
legend
elements
The fieldset element allows us to group form elements together, and even allows you to have form elements outside of a form, but use an ID to still be part of a given form.
As we're making a group with the
fieldset
, we can also provide a label for that group using the
legend element
.
With how they work, they are ideal for groups of radio buttons, checkboxes, and other form fields that are related to one another.
base
element
The base element is a very interesting one, which allows you to define a base URL for all of the relative links on that page.
This is meta data, so it must be placed in the head, before anything else that has a URL in it.
Also, Open Graph meta tags will not use base, you still have to use full URLs for those.
If you want to play with it, here are a few relative links (that don't go anywhere) and there is a base element at the top of this HTML.