These tags are meaningless without an attribute.
Answers
Answered by
1
Answer:
HTML is not about presentation. It is a way of describing data. If you have some text that represents a label for an input, you wrap it in label tags not for presentation but because that's what it is. Without the label tag, that text is almost meaningless. With the label tag and its for attribute (or not*) you are providing meaning and structure and forming a relationship between your markup that can be better understood by computers/parsers/browsers/people.
* you don't necessarily need the for if you wrap the label around the input
Similar questions
India Languages,
4 months ago
English,
4 months ago
English,
4 months ago
Physics,
8 months ago
Social Sciences,
1 year ago
Physics,
1 year ago
Biology,
1 year ago