Skip to main content
Participating Frequently
December 7, 2020
Question

How to Define <H1> font size? I want to assign H1 to this text for SEO purposes only.

  • December 7, 2020
  • 4 replies
  • 367 views

The top screenshot shows my keywords as currently on the homepage. I like the way it looks and do not want to change it.

 

The bottom screenshot shows the current code. I want to change it to H1 tags instead, for SEO purposes only. Just to let the engines know these are important keywords.

 

But I do not want the font size to display larger when doing so ( which automatically occurs).

 

I would like the font to remain exactly as is shown, even after we change it to H1.

 

Thanks

 

    This topic has been closed for replies.

    4 replies

    Nancy OShea
    Community Expert
    Community Expert
    December 7, 2020

    1. Read the Google SEO starter guide.
    https://developers.google.com/search/docs/beginner/seo-starter-guide

     

    2. Use good semantic HTML structure.  Think of it as an outline with your most important text on top:

     

    <h1>This is the most important text on the page.</h1>

    <h2>This is 2nd most important text.</h2>

    <h3>This is important but not as important as h1 or h2.</h3>

    <h4>This is less important than h3.</h4>

    <h5>This is less important than h4.</h5>

    <h6>This is less important than h5 but slightly more important than a paragraph.</h6>

    <p>This is normal descriptive text.</p>

     

    3. Style content as desired with CSS code, usually contained in an external stylesheet.

    <link rel="stylesheet" href="custom_stylesheet.css">

     

    EXAMPLE TEXT STYLES:  Gives users a visual clue to what's most important.

    h1 {font-size: 2.5rem}

    h2 {font-size: 2rem}

    h3 {font-size: 1.75rem}

    h4 {font-size: 1.5rem}

    h5 {font-size: 1.25rem}

    h6 {font-size: 1.1rem}

    p  {font-size: 1em}

     

    Nancy O'Shea— Product User & Community Expert
    Legend
    December 7, 2020

    Here's an exmple with heading and subheading

     

    <h1 style="color: #009900;">Professional Resumes - Resume Help</h1>
    <h2>Resume Writing - Resume Service Certified Resume Writer</h2>

    You don't need the span tag and also you could move the color style to your css file  if you want to apply it to all H1 tags throughout the site.

     

    h1 {
    color: #009900;
    }
    Paul-M - Community Expert
    Legend
    December 7, 2020

    Might be a bit long for h1 but you can just change h5 to h1 ... its all about having the correct structure on the page H1 at the top of the page, sub heading(s) in h2 then if you need a further levels of subheading h3 and so on ...

    Paul-M - Community Expert
    Legend
    December 7, 2020

    Well look at your css and see what font-size the h5 tag is using then apply that to the h1 tag

     

    h1 {

    font-size: 16px;

    }

     

    The h1 tag is meant to be used for a 'signifcant' heading. If the text is that important to warrant using an h1 tag I'd be inclined to use it as a page title NOT a bit of small text under a button.