Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Heading tags increase font size

Featured Replies

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.

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.

 

In your CSS, just use

 

h2{font-size:#)

as pointed out in the other forum where you posted this: why? why would you want heading text - that gives structure to your document - not to appear differently to normal. that's bad usability and typograhpy ;)

The point of the different header tags is to allow differentiation and different levels of integrated boldness for your...well...headers.

It's quite a simple matter of using css to format your headers, or any object for that matter, in any way you please.

But FYI, the different headers start with the largest with the h1 tag, then get increasingly smaller.

The reason that the heading tags change the size in the HTML, is for people building basic websites in the old days using just HTML (or even today), now that you can attach stylesheets with CSS you can achieve a much higher level of control and tell it that you want all your H2 tags to be a certain size, color, font, etc etc.

 

Alternatively you may also be able to set some kind of CSS Reset up, but I dont know whether it will stop the H2 tag from changing the size of your text.

I suggest using a 'HTML Kitchen Sink' on new site builds. This is a block of HTML that you can find generators for across the web, which lists pretty much all relevant semantic markup.

 

You can paste this into a page and it'll give you your h1, h2, h3, tables, bullet lists, links etc. Style this page up, bringing your font sizes and colours inline with each other before you start building. Then you know that referencing 'h1' tags across your site will yield the same result and the site will stay on brand.

 

E.g, your feature colours for the site are purple and green. Your main text is dark grey. Adjust p to dark grey, h1's to green and h2's to purple (or whatever your particular style choice are.) Get yourself happy with the way the semantics work in your HTML Kitchen Sink page, and then use that across your site.

 

You can delete the kitchen sink at the end before live.

 

http://prandall.com/downloads/kitchensink.htm

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.