Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Style heading tags with css reset [closed]

After using a css reset, all my heading tags are reset (ofcourse). What is the best way to style them like normal.

Surely there is better way then this?

h1 { font-size: 2em; }
h2 { font-size: 1.5em; }
h3 { font-size: 1.3em; }
h4 { font-size: 1em; }
h5 { font-size: 0.8em; }
h6 { font-size: 0.7em; }
like image 820
Jeremy Avatar asked Jul 28 '13 08:07

Jeremy


People also ask

How do I reset CSS styles?

Answer: Use the CSS all Property You can simply use the CSS all property with the value revert to remove the additional author-defined CSS styling for an element (i.e. reset to browser's default CSS styling).

What is a CSS Reset style rule?

A CSS Reset style sheet is a list of rules that 'reset' all of the default browser styles. We reset the browser styles for two primary reasons: Not all browsers apply the same default rules. They may be similar, but not exact.

How do you style headings in CSS?

To customize the header elements using the CSS properties, we can change the font size of header text using font-size property, change the background color of the header container using background-color property, set the width and height of the header container, add padding between the header components and so on.


1 Answers

The way that you have set up the new header style will work fine. You might want think about adding

h1,h2,h3,h4,h5,h6 {
  font-weight: normal;
  font-style: normal;
}

to make sure the type is default set to non italic/oblique or bold (unless you want the default to be strong)

like image 71
Chong Waldo Avatar answered Sep 30 '22 07:09

Chong Waldo