+ 2

Help me about Input tag or button tag

1. <input type="submit" value="Submit" > 2. <button>Submit</button> Both no.1 and no.2 show the same output What is difference between no.1 and no.2?

5th Nov 2022, 9:05 AM
Atia Farha
Atia Farha - avatar
10 ответов
+ 5
https://code.sololearn.com/Wg54zNBSUsuu/?ref=app Well I think HTML5 users have forgotten about HTML4. Actually <input> tag was used in HTML4 to make buttons
5th Nov 2022, 10:54 AM
Just Some Random Guy
Just Some Random Guy - avatar
+ 3
You can create button with input tag. But button tag is specifically designed and used only for button creation. It has additional features for button functionality compare to input[button].
5th Nov 2022, 10:14 AM
Jayakrishna 🇮🇳
+ 2
The main basic difference is if we create button through input, So we are not only creating button in it but we can put text, images, password etc. But if we create button through button tag then we create only button. I hope it's clear to you.
5th Nov 2022, 9:30 AM
Sakshi [Offline 🙃]
Sakshi [Offline 🙃] - avatar
+ 2
Jayakrishna🇮🇳 is button tag better than input tag?
5th Nov 2022, 9:51 AM
Atia Farha
Atia Farha - avatar
+ 2
Atia Farha it's still supported in HTML5 but we are not using it very often cuz button is very easy to write and it's more mutable in comparison to input buttons
5th Nov 2022, 11:06 AM
Just Some Random Guy
Just Some Random Guy - avatar
+ 2
ANIGBATA NWAMAKA Like this, <i class="fa fa-user-circle" aria-hidden="true"></i> Don't forget to add <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> inside the head tag. For more awesome icons search fontawesome's website. They have thousandth of icons available for you to explore. Bootstrap also provides readily made icons, but not much than fontawesome. And please in the future create your own thread if you have questions.
7th Nov 2022, 3:29 AM
Mozzie
Mozzie - avatar
+ 1
Jayakrishna🇮🇳 oh I got it. Thank you
5th Nov 2022, 10:17 AM
Atia Farha
Atia Farha - avatar
+ 1
Snehil Pandey that means <input> tag isn't used in html5??
5th Nov 2022, 11:01 AM
Atia Farha
Atia Farha - avatar
0
Please how do I import an icon in html? I also want to know if the icons can be styled using css?
6th Nov 2022, 8:13 PM
ANIGBATA NWAMAKA
ANIGBATA NWAMAKA - avatar