What are the default font sizes (in pixels) for the html heading tags (

,

,

, etc.)?

后端 未结 4 1853
北海茫月
北海茫月 2021-01-31 09:11

What are the default font pixel sizes for the heading (h1-h6) tags?

4条回答
  •  隐瞒了意图╮
    2021-01-31 09:37

    For an actual proof, take a look at the html.css (171 - 237) with the default style of Mozilla Firefox:

    h1 {
      font-size: 2em;
    }
    
    h2 {
      font-size: 1.5em;
    }
    
    h3 {
      font-size: 1.17em;
    }
    
    h4 {
      font-size: 1.00em;
    }
    
    h5 {
      font-size: 0.83em;
    }
    
    h6 {
      font-size: 0.67em;
    }
    

    The whole css is:

    h1 {
      display: block;
      font-size: 2em;
      font-weight: bold;
      margin-block-start: .67em;
      margin-block-end: .67em;
    }
    
    h2,
    :-moz-any(article, aside, nav, section)
    h1 {
      display: block;
      font-size: 1.5em;
      font-weight: bold;
      margin-block-start: .83em;
      margin-block-end: .83em;
    }
    
    h3,
    :-moz-any(article, aside, nav, section)
    :-moz-any(article, aside, nav, section)
    h1 {
      display: block;
      font-size: 1.17em;
      font-weight: bold;
      margin-block-start: 1em;
      margin-block-end: 1em;
    }
    
    h4,
    :-moz-any(article, aside, nav, section)
    :-moz-any(article, aside, nav, section)
    :-moz-any(article, aside, nav, section)
    h1 {
      display: block;
      font-size: 1.00em;
      font-weight: bold;
      margin-block-start: 1.33em;
      margin-block-end: 1.33em;
    }
    
    h5,
    :-moz-any(article, aside, nav, section)
    :-moz-any(article, aside, nav, section)
    :-moz-any(article, aside, nav, section)
    :-moz-any(article, aside, nav, section)
    h1 {
      display: block;
      font-size: 0.83em;
      font-weight: bold;
      margin-block-start: 1.67em;
      margin-block-end: 1.67em;
    }
    
    h6,
    :-moz-any(article, aside, nav, section)
    :-moz-any(article, aside, nav, section)
    :-moz-any(article, aside, nav, section)
    :-moz-any(article, aside, nav, section)
    :-moz-any(article, aside, nav, section)
    h1 {
      display: block;
      font-size: 0.67em;
      font-weight: bold;
      margin-block-start: 2.33em;
      margin-block-end: 2.33em;
    }
    

提交回复
热议问题