0

Attributes

Is it compulsory to follow the exact sequence when coding an attribute? For example, <input type=“” name=“”> and <input name=“” type=“”> Would that affect the outcome? What does ‘value’ really mean in an input ?

19th Nov 2021, 12:48 PM
Ogu Charles Chukwudi
Ogu Charles Chukwudi - avatar
4 odpowiedzi
+ 2
Order of tag attributes doesn't matter, and there is no standard defined. https://stackoverflow.com/questions/24999758/does-order-of-attributes-matter-in-script-tags About <input> tag 'value' attribute. https://www.w3schools.com/tags/att_input_value.asp
19th Nov 2021, 2:17 PM
Ipang
+ 1
thank you but the ‘value’ question still doesnt make sense🤷🏽‍♂️
19th Nov 2021, 4:19 PM
Ogu Charles Chukwudi
Ogu Charles Chukwudi - avatar
0
It is confusing because <input> is an element with many faces. Depending on the value of 'type' attribute https://www.w3schools.com/html/html_form_input_types.asp - an <input> can represent a text input, a checkbox etc etc. Due to this fact, what 'value' attribute is (type of data), and what it is for (use case and purpose) becomes contextual, depends on the 'type' attribute specific value. Kinda hard to explain really : )
19th Nov 2021, 7:11 PM
Ipang
0
its okay. i think i’ll figure it out with Time. Really do appreciate your time. Thank you so much
19th Nov 2021, 9:01 PM
Ogu Charles Chukwudi
Ogu Charles Chukwudi - avatar