houdriwiokug houdriwiokug - 1 year ago 93
HTML Question

How to adjust the width of a hr tag

I've got a problem with setting the width of hr tag.. I mean I want my hr tag to be displayed half of the full width like this image:

enter image description here

As you can see the hr tag is between the h1 tag and paragraph and it's half of screen full width.

I have searched and all I got was to setting the hr tag like this:

<hr size="30">

But that just does not work. So do you know how to set the width of hr tag ?

Answer Source

you can set the style attributes of the hr element in css:

hr{width:50%;margin:0 auto;}
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download