Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Horizontal ruler in HTML
WhatsApp
Venkatesan Jayakantham
4y
8.8
k
0
0
25
Blog
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
Up Next
How To Convert HTML To PDF Using JavaScript
Ebook Download
View all
Voice of a Developer: JavaScript From Scratch
Read by 10.9k people
Download Now!
Learn
View all
Membership not found