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.
Hi ! CSS is only one solution for your problem. in css you have mention so when you use this H2 or H1 then also your font size will not increase.
Thank you for your response. I was able to successfully reduce the font size by entering a font size tag.
Which means you're writing code like it was 1997 -- since tags like FONT and CENTER have no business being used on websites after that time. Yes, the DEFAULT behavior for H2's is larger text, but that is not their meaning... they mean "The start of a subsection under the H1 preceding it" -- just as a H1 means "the heading under which all sections of the page are a subsection" and a H3 means "the start of a subsection under the h2 preceding it"... and you can use a horizontal rule (HR) to indicate a change in section that does not have a heading. (This is also why the black hat SEO-tard use of H1's on the first 'topic' of a page is rubbish coding, and why using a h1 after a h1 for a tagline is equally ignorant!) Thats' the core of semantic markup and proper document structure -- Saying what things are: This is a list of short items (UL), this is tabular data (TABLE), this is a heading for a row or column in a table (TH), this is a heading (h1..h6), this is a change in topic (HR), this is a paragraph (P), etc, etc... If you are worrying about what the tags you are using look like by default on screen, you are almost guaranteed to be using the wrong tags in building your page. That's CSS' job! Separation of presentation from content -- one of the many ways to provide accessibility and graceful degradation -- and leverage caching models too. If you're talking about code like this: <h2><div class="title"><font size="2">Our Mission Statement:</font></div></div></h2> Code (markup): then you've completely borked it since there's no reason for the DIV, you've got a extra closing /DIV, and FONT has no business whatsoever in there. Target the H2 in your stylesheet... and if you've got a good parent container (where a div should probably be) around that section, that's where you'd isolate just the H2 that should have the appearance you want. Much of using CSS and proper markup is about using less markup... don't like how H2's look? Rather than throwing extra HTML into every single one of them for no good reason, target the H2's just once with CSS so they behave how you want for that ONE media target (desktop/laptop screen in this case).. that way when you want to target all the other possibilities (print, small screen like ipad/ipod/iphone/droid/tablets) or even non-visual users, you can do so without the 'for desktop screen' stuff being in the way. Again, refer to the markup I posted in your other thread -- there is literally no good reason to be using much more than that in the HTML -- and that makes PROPER use of heading orders.