Search code examples
htmlabbr

Can you style a <abbr> tag?


Can you style a <abbr> tag using css? In firefox, it is displayed with dots underneath the words like in the picture below:
enter image description here

Is this a browser by browser thing? can you remove the dots or do you just use the title="title here" option? thanks


Solution

    • Can you style a tag using css?

      Yes, you can.

    • In firefox, it is displayed with dots underneath the words

      Yes. Firefox default style is

      abbr[title], acronym[title] {
          border-bottom: 1px dotted;
      }
      
    • Is this a browser by browser thing?

      Yes, this behaviour is determined by the default stylesheet of each browser. Then, different browsers may display it different by default.

    • Can you remove the dots?

      Yes, just override the default syle:

      abbr[title], acronym[title] {
          border-bottom: none;
      }