Rackie Posted December 6, 2006 Share Posted December 6, 2006 Is there an HTML code to draw a straight black line? Just curious! Link to comment Share on other sites More sharing options...
real_illusions Posted December 6, 2006 Share Posted December 6, 2006 yup<hr />draws a nice horizontal line across the page or area of the page its placed inhttp://www.w3schools.com/tags/tag_hr.asp Link to comment Share on other sites More sharing options...
jesh Posted December 6, 2006 Share Posted December 6, 2006 yup<hr />draws a nice horizontal line across the page or area of the page its placed inhttp://www.w3schools.com/tags/tag_hr.asp <hr />s work well but I sometimes have a hard time using CSS to make them look how I want them to look. So, sometimes, I use this instead:<div style="height: 1px; overflow: hidden; background-color: #000000;"></div> Link to comment Share on other sites More sharing options...
jlhaslip Posted December 6, 2006 Share Posted December 6, 2006 Just a reminder that the hr tag is deprecated and is not available with strict doctypes in xhtml.I will often use a border-bottom (or top) with some padding and margin to create a similar effect. Link to comment Share on other sites More sharing options...
jesh Posted December 6, 2006 Share Posted December 6, 2006 Just a reminder that the hr tag is deprecated and is not available with strict doctypes in xhtml.I will often use a border-bottom (or top) with some padding and margin to create a similar effect.Is the element itself deprecated or just the "presentation attributes"?http://www.w3schools.com/tags/tag_hr.asp says:All "presentation attributes" of the hr element are not supported in XHTML 1.0 Strict DTD. Link to comment Share on other sites More sharing options...
real_illusions Posted December 6, 2006 Share Posted December 6, 2006 yeah, i have <hr /> tags in my sites and the site still validates. The attributes for styling them, however, doesn't validate. Link to comment Share on other sites More sharing options...
paramasivan Posted December 7, 2006 Share Posted December 7, 2006 Under code will give you a colorful line(of color #A6E2FF)<td width="1" valign="top" bgcolor="#A6E2FF"> </td> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now