TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Horizontal ruler in HTML
Venkatesan Jayakantham
Apr 29, 2020
8.7
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
Horizontal ruler in HTML
Introduction
I happened to use HTML for my company website (
http://www.kaashivinfotech.com/
). During my design for segregating the content, I've used table row and table data with lines in the boundary like, OOps, it's the costliest work to do and it's not an efficient way to give a broken line between the contents.
<
tr
>
<
td
style
=
"width:70%; visibility: visible; border-top-width: 1px; border-left-width: 1px; border-left-color: black; border-bottom-width: 1px; border-bottom-color: black; border-top-color: black; border-right-width: 1px; border-right-color: black;"
>
</
td
>
</
tr
>
On my random search, I found the horizontal ruler in my VS toolbox. Awesome, Here is the one-line code to achieve the same,
<
hr
/>
To provide color to the ruler
<
hr
color
=
"Orange"
/>
To provide the size to the ruler. Here is an option
<
hr
color
=
"Orange"
width
=
"100"
size
=
1
/>
width - Indicates the length of the ruler size - Indicates the thickness of the ruler.
Cheers,
Venkatesan Prabu .J
Horizontal ruler in HTML
Next Recommended Reading
How To Convert HTML To PDF Using JavaScript