Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's CSS version of <hr noshade/>

Tags:

html

css

I know that noshade is not supported in HTML5, and they recommend to use CSS to accomplish this... but what is the CSS replacement to this:

<hr noshade/>
like image 730
Arian Faurtosh Avatar asked Nov 26 '13 19:11

Arian Faurtosh


People also ask

What is HR Noshade in HTML?

Definition and Usage The noshade attribute is a boolean attribute. When present, it specifies that a horizontal line should render in one solid color (noshaded), instead of a shaded color.

What is HR tag in CSS?

The <hr> tag defines a thematic break in an HTML page (e.g. a shift of topic). The <hr> element is most often displayed as a horizontal rule that is used to separate content (or define a change) in an HTML page.

Can HR be styled with CSS?

The <hr> element is styled with CSS rules instead of attributes. Change the width of the horizontal line by setting the width property and then center it using the margin property.


2 Answers

This might work:

hr
{
    border: 1px solid rgb(128, 128, 128);
}

jsFiddle

like image 112
nkmol Avatar answered Nov 25 '22 14:11

nkmol


This works:

hr {
    background: aqua;
    height: 1px;
    border: 0px;
   }
like image 23
bilel dellai Avatar answered Nov 25 '22 12:11

bilel dellai