HTML Tutorial - The 'for' attribute on labels and input fields

preview_player
Показать описание
A quick video today on the 'for' attribute within HTML. We take a look at what it's used for and how exactly you would implement it.

When I first started learning HTML I would always incorrectly use this attribute alongside the 'name' attribute which was clearly incorrect.

Support me on Patreon:

For your reference, check this out:

Follow me on Twitter @dcode!

If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!
Рекомендации по теме
Комментарии
Автор

Most people online don't know how to explain this in layman's terms. You killed it bro, thx for this

thomascarlton
Автор

This was a very, very AWESOME tutorial! Short and very well detailed so that a person new to coding can follow and understand each step of the way!

victorrivas
Автор

Thank you. Precise and clear explanation.

muthukumarnp
Автор

thanks, this video makes it easier for me to understand it.

Aziz-kwct
Автор

Also worth mentioning it's always important to have label associated for every input field for people who use a screen reader to navigate the web. Otherwise they would not know what the input they are on is for. This may block or be a huge annoyance to these users from completing the actions they are trying to complete.

msgesus
Автор

thanks for your video, it's saved my day.

VuongPianoSolo
Автор

can the <label> and <input> syntax interchange?

nestaho
Автор

Trying to Google "What is for for?" was a hard search to find. Thanks!

statesman
Автор

Can you explain why you have a class and action attribute in the form element?

wgnwBash
Автор

Thank you so much bro. Idk why ppl just don’t say what it’s for lol thanx

wgnwBash
Автор

Great, can you also explain what is the name attribute used for?

moonhub
Автор

But you still need to have a name attribute if you have more then one option to select. correct?

arishernandez
Автор

Hey dcode, what is the best "platform' to practice writing css and html? What are you using in this video? Can I use it on ios?

gaberondon
Автор

how to use for for a class instead of an id

kartik
Автор

As a newbie career-changing driven Dude, I appreciate you 😊

AdrianoJolivesi