SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Oct 2009
    Posts
    111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Heading tags increase font size

    I am trying to integrate heading tags within my website. But whenever I use h2 tags, the font size increases. Is the font size supposed to increase when using h2 heading tags? Is there anyway that I could have the fonts remain the same size while using h2 tags? Thanks.

  2. #2
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Yes the font size of the more important Headings, e.g. H1 an H2 are typically rendered in a larger font than a paragraph P element because they are headings and not body text. HTML is designed to describe the structure, not the presentation of the document. http://www.w3.org/TR/CSS2/sample.html With CSS you could set the font size and so-forth. Something loosely on the lines of: h2 { font-size : 1em; }

  3. #3
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,888
    Mentioned
    122 Post(s)
    Tagged
    1 Thread(s)
    As Robert says, you can use CSS to change the visual appearance of headings in any way you want. In terms of making them the same size as the rest of the text, that's perfectly possible ... although if you aren't going to make the text any bigger than the rest of the content, you have to ask yourself if it really wants to be in an <h2>, because usually you want headings to stand out a bit.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •