Attributes | Sololearn: Learn to code for FREE!



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 ?

11/19/2021 12:48:27 PM


4 Answers

New Answer


Order of tag attributes doesn't matter, and there is no standard defined. About <input> tag 'value' attribute.


thank you but the ‘value’ question still doesnt make sense🤷🏽‍♂️


It is confusing because <input> is an element with many faces. Depending on the value of 'type' attribute - 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 : )


its okay. i think i’ll figure it out with Time. Really do appreciate your time. Thank you so much