• Hi,

    Is there a way to change the font size of the H2 tag? The default setting is too large. Thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • If your current theme doesn’t have a section for user-added CSS, you can use a Child Theme or a CSS plugin to customize the H2 size.

    And if your theme offers user-added CSS or you installed a CSS plugin, the CSS to change the font size looks like this:

    h2 {
    font-size: 20px;
    }

    And change the 20px until you like its size.

    Thread Starter chcw

    (@chcw)

    Hi,

    Thank you very much. The theme does have a user-added CSS section. But how to apply the h2 to the post only. I do not want to apply h2 to all the other elements on the page.

    Thread Starter chcw

    (@chcw)

    Hi,

    Where are the default CSS classes in WordPress? Which class shold I use for the post headings. It seems that there are no such one online?

    You need to link to your Web site. Each theme has its own classes. But, in general, the post title class would be .entry-title, .post-title, or something like that.

    It also depends on whether you’re talking about the <h2> post title or just all <h2> elements within the post.

    The H2’s are usually theme specific. If you can identify the H2 class in the style sheet for the theme you are using, you can then make the changes in the custom CSS.

    Do you use any developer tools such as Firebug for Firefox, or the built in developer tools in IE or Chrome?

    It might help identify the H2 class for you if you could post a link to your site, or tell us what theme you’re using.

    Thread Starter chcw

    (@chcw)

    Hi, Justin,

    I am talking about the <h2> elements within the post, below is a sample post:

    https://www.datanumen.com/blogs/2-ways-block-foreign-junk-emails-outlook/

    The first subheading in the post body, i.e. “Utilize Junk Email Filter” is using <h2> tag.

    I find it is using .entry class, so I apply:

    .entry h2 { font-size: 20px; }

    Is that correct?

    Thanks

    I think that’s probably the one! 🙂

    Try placing .entry h2 { font-size: 14px; } in your custom css and see if that changes the right h2 for you. Of course, adjust the size to whatever you need it to be.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to change the size of the H2 tag’ is closed to new replies.