DEV Community

Cover image for Awesome Uniquee 5 HTML tags and attributes
iFTekhar
iFTekhar

Posted on

Awesome Uniquee 5 HTML tags and attributes

Hey in this article I am about to show you some awesome tags and attribute in HTML that can help you a lot in some cases. enjoy guys!

1) The defer attribute

You might want to tell the browser to load your HTML DOM first them the javascript scripts. well, that is really easy to do by using the defer attribute in the script tag.

It tells the browser to load the HTML DOM first and not wait for the javascript scripts to load.

image

2) The Ordered list starting value

I'm sure you have used or heard about the li tag. it makes a list with nice-looking order numbers such as 1. , 2. ... But you can also change this order number and can put a starting attribute in order to tell the ol from which number it should start listing

You can also use the value attribute on the li tag in order to give it a specific order number.

image

image

3) The details tag

In HTML there is a tag called details tag which you can use in order to specify additional details that the user can open and close on demand.

which means you can put some details on the details tag and it would only show the heading and when the user opens the full details tag then the user can see all details inside the details tag

I know you got confused by what I wrote so there is an example below from which you will understand completely what I was saying.

image

image

image

4) Sending mail using HTML

Now you guys are going crazy by reading the title and thinking that this guy is crazy. But actually, you really can make functionality to allow the users to send mail using HTML.

When the user clicks that link a user will get a popup from which the user can choose from which service the user wants to send the mail from then after selecting the service such as Gmail the user will be redirected to Gmail (or other services) compose with the details that are provided on the link.

image

image

5) The required attribute

Maybe most of you know this about the required attribute but it is easy to forget.
instead of using javascript and if statements and all those fancy stuff you can just put the required attribute on the input to make it a required field.

image

image

Top comments (0)