Is there any way to make the HTML underline thicker?

Rodrigo picture Rodrigo · Jun 28, 2010 · Viewed 20.7k times · Source

I have a centered div with a nested h1 inside. Is there any way to underline it with a thicker line than the html default?

Answer

Gert Grenander picture Gert Grenander · Jun 28, 2010

This will give you control over the U tag's underline:

<style type="text/css">
  u {
    text-decoration: none;
    border-bottom: 4px solid black;
  }
</style>

In this case the underline will be four pixels.