Measurement attribute | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Measurement attribute

Hi my dears! Hope you are happy. My question is about the meaning of “hr” in the measurement attribute and if there is a “hr length” attribute. Thank you, God bless all of you!

14th Jun 2018, 6:38 AM
‎‏‪‏‪‏‪Vinícius dos Reis Lobo Silva‬‏‬‏‬‏‎
‎‏‪‏‪‏‪Vinícius dos Reis Lobo Silva‬‏‬‏‬‏‎ - avatar
8 Answers
+ 3
"hr" are the initials for "horizontal rule" and it's an empty tag like this: <hr />. If you're looking to set the width of <hr /> you can use the width attribute like this: <hr width="50px" /> As far as i know there is no measurement unit by the name of "hr" or an attribute by the name of "measurement". Hope you find the info useful.
14th Jun 2018, 7:01 AM
Ryan
Ryan - avatar
+ 4
Thank you KINGDX, but I still do not get It, I believe It is important to know use both, in HTML and CSS, but what should I use? Have one of them that are more recommendable?
14th Jun 2018, 6:51 AM
‎‏‪‏‪‏‪Vinícius dos Reis Lobo Silva‬‏‬‏‬‏‎
‎‏‪‏‪‏‪Vinícius dos Reis Lobo Silva‬‏‬‏‬‏‎ - avatar
+ 4
Thank you Xianort X, you makes me understand more about It. KINGDX the same to you. I really appreciate your help guys! Peace and love
14th Jun 2018, 7:14 AM
‎‏‪‏‪‏‪Vinícius dos Reis Lobo Silva‬‏‬‏‬‏‎
‎‏‪‏‪‏‪Vinícius dos Reis Lobo Silva‬‏‬‏‬‏‎ - avatar
+ 3
You're welcome Sr.Viniisil glad i can be of some use😊
14th Jun 2018, 7:21 AM
Ryan
Ryan - avatar
+ 2
You can set its width with CSS <hr style="width : 50%"> or 50px or 50 em, whatever your want
14th Jun 2018, 6:44 AM
CHMD
CHMD - avatar
+ 2
html can't go without CSS, html alone doesn't look like anything the eye can be pleased to see. whenever you need to manipulate the display properties of an html element (a div, an input, hr, a, span...etc) you will need to use CSS to alter the color, the size, the placement, to center an element, to move it left/right/up/down, to animate the elemnt and so on and so forth
14th Jun 2018, 6:58 AM
CHMD
CHMD - avatar
+ 2
For an additional information, the width attribute for hr is deprecated and should not be used. Starting from HTML5, CSS should always be used to stylize elements. Take a look at the compatibility note here https://www.w3schools.com/tags/att_hr_width.asp good luck
14th Jun 2018, 7:18 AM
CHMD
CHMD - avatar
+ 2
measurement attributes are the length, which is considered and written as "width" and the height they are measured in pixels or percentages Hope it was helpful
15th Feb 2019, 12:12 AM
VICTOR OGWUMIKE
VICTOR OGWUMIKE - avatar