fatherazrael fatherazrael - 3 months ago 13
CSS Question

What are the default CSS styling of heading tags? (H1, h2, h3, h4, h5)

In HTML, headings are denoted with

<H>
(1,2,3,4,5,6) tag.

My question is regarding following HTML code:

<div class="pure-u-1-1 pure-u-lg-3-3">
<h3><form:label path="gen">Registrer Bruker</form:label></h3>
</div>


Instead of writing
<H3>
, i want to write property of class in CSS ; which gives same font size (look and feel); as of heading HTML gives. Also is there predefined property for same in CSS?

Answer

The answer is no, however you might hack the styles. Most browsers will try to use these styles

(Taken from: w3schools)

h1 { 
    display: block;
    font-size: 2em;
    margin-top: 0.67em;
    margin-bottom: 0.67em;
    margin-left: 0;
    margin-right: 0;
    font-weight: bold;
}
h2 {
    display: block;
    font-size: 1.5em;
    margin-top: 0.83em;
    margin-bottom: 0.83em;
    margin-left: 0;
    margin-right: 0;
    font-weight: bold;
}
h3 { 
    display: block;
    font-size: 1.17em;
    margin-top: 1em;
    margin-bottom: 1em;
    margin-left: 0;
    margin-right: 0;
    font-weight: bold;
}
h4 { 
    display: block;
    margin-top: 1.33em;
    margin-bottom: 1.33em;
    margin-left: 0;
    margin-right: 0;
    font-weight: bold;
}
h5 { 
    display: block;
    font-size: .83em;
    margin-top: 1.67em;
    margin-bottom: 1.67em;
    margin-left: 0;
    margin-right: 0;
    font-weight: bold;
}
h6 { 
    display: block;
    font-size: .67em;
    margin-top: 2.33em;
    margin-bottom: 2.33em;
    margin-left: 0;
    margin-right: 0;
    font-weight: bold;
}
Comments