Horizontal line css without hr Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP, Bootstrap, Java, XML and more. com. horizontal-line{ border-top: 1px solid #9E9E9E; border-bottom: 1px solid #9E9E9E; } Although it works, I want this line to be thinner. Here are a few methods to do this:. Jul 19, 2021 · How can I draw a thin horizontal line without using the <hr> tag ? I tried this:. Jun 2, 2006 · I would like to have a thin horizontal line of one particular colour to put on top of a div and right below it. Aug 9, 2014 · If you don’t want to use <hr> in your markup for whatever reason (for example it isn’t “semantic”) but you still want a horizontal line between two elements, this simple little trick achieves the desired result: Feb 14, 2017 · In HTML 4. 5px, but it didn't work. Also attributes like align, size and width are not supported in HTML5. Here are a few methods to do this: Jul 19, 2021 · How can I draw a thin horizontal line without using the <hr> tag ? I tried this:. Whenever possible, you should stick to horizontal rules for their semantic value. In HTML, if you'd like to create a horizontal line without using the <hr> tag, you can achieve this by using CSS styles to create a visual line effect with other HTML elements. See more examples. I tried to reduce 1px to 0. 01, the <hr> tag represents a horizontal rule. border-top: 6px solid purple; width: 120%; You can use. In HTML5, the <hr> tag defines a thematic break. CSS. First, <hr> can be styled with CSS. The proper alternative to this is defining a div as: HTML. You can use the border property to style a hr element: The HTML hr tag. 5); } Code above courtesy of CSS-Tricks. Learn how to style an hr element with CSS. hr { height: 12px; border: 0; box-shadow: inset 0 12px 12px -12px rgba(0, 0, 0, 0. xrtz ksdprth fgjo vfnabp bwnildxs uifb ybw lztt ycbv uwri