Last Updated: February 25, 2016
· mikeballan

Styling your HR tag using just HTML

If like me you have to build alot of HTML emails you may need to have a 1px grey line as an HR and by just using HTML, all you have to do is use this code:

<hr style="color:#919090; background-color:#919090; height:1px; border:none;">

I am aware that you can use CSS in emails too but this way seems to work very well too..!

3 Responses
Add your response

That's...not actually "just HTML". That's inline CSS, which is usually not recommended. Most web designers recommend that HTML be used for page structure and semantics while styling be kept to external CSS stylesheets.

over 1 year ago ·

Very true, but I forgot to mention this method is mainly used in emails where you can't use CSS, although I have been using CSS more and more in my email builds..!

over 1 year ago ·

You can use CSS in html emails, it just has to be inline rather than external.

over 1 year ago ·