0
Doubt regarding Attributes
Hello, I am new to HTML, I have a small doubt regarding attributes, Should I use specific name or any variable to change specific thing ? For example : If I want to change width of horizontal line, Should I must use width = "50px" or can I use something = "50px"? In detail : SoloLearn Code : <hr width = "50px"> My code : < hr something = '50px'> Note : I must have tested it, But people clarifing doubts is the best way to learn for me !..
7 ответов
+ 1
No programming languages don't consider fixed syntax as variables. that would be like saying you could write a for loop by doing apple( var i = 0; i < 10; i ++) {}
the attributes in html are the same. they are fixed names that are a part of the W3C standard for the language.
+ 1
if you want to change the width you say width="50px"
what else would you use to change the width?
+ 1
no. it doesn't make sense. if you want to change the width why would you say blue="50px" or if you want to alter the color why would you say camel="red"?
+ 1
Adam thanks for the clarification !. :D, Have a Great day :D !.
+ 1
and you too. :)
0
Adam , That's What I am asking, Is there a chance to use any variable?
0
Adam I am asking this because, many programming languages consider them as variables, and We can give them any name !. So, Finally doubt, How does Html editor know the attribs ?