Font Style and Size Change

Discussion in 'HTML & Website Design' started by MarkStrobel3367, Apr 23, 2018.

  1. #1
    I built a site using the New Google Sites. It appears that the standard text is Roboto. The font size appears to be between 4 and 5. I have been using the following code to adjust the default font style and size <font face="Roboto" font size="4"> in embedded code snippets for html. However using 4 makes the text smaller and using 5 makes the text bigger than the default text in the New Google Sites. What code do I need to make the text size the same? Thanks.
     
    MarkStrobel3367, Apr 23, 2018 IP
  2. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    7,265
    Likes Received:
    1,693
    Best Answers:
    31
    Trophy Points:
    475
    #2
    Try something like:

    <span style="font-family: 'Roboto', sans-serif; font-size: 16px;">Your text goes here...</span>
    Code (markup):
    or

    <span style="font-family: 'Roboto', sans-serif; font-size: 1em;">Your text goes here...</span>
    Code (markup):
    Then adjust the font-size to match your site font: (14px, 15px, 16px or 0.87em, 0.93em, 1em).

    Alternately you can use <style></style>

    <style>
    .myFont {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    }
    </style>
    
    <span class="myFont">Your text goes here...</span>
    Code (markup):
     
    qwikad.com, Apr 23, 2018 IP
  3. MarkStrobel3367

    MarkStrobel3367 Well-Known Member

    Messages:
    116
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #3
    Thank you so much!! Your first example did the trick!
     
    MarkStrobel3367, Apr 23, 2018 IP
    qwikad.com likes this.