Skip to main content
Participant
October 19, 2021
Question

Changing font size

  • October 19, 2021
  • 2 replies
  • 356 views

I have CS6, how to I set the font size for a single sentence?

    This topic has been closed for replies.

    2 replies

    Participant
    October 29, 2021

    All the replies address changing the font size in HTML, isn't it possible to change the font side in Design mode?

    Nancy OShea
    Community Expert
    Community Expert
    October 29, 2021

    Learn to work with code.  It's much faster than Design Panels.

     

     

    Nancy O'Shea— Product User & Community Expert
    B i r n o u
    Legend
    October 19, 2021

    the easiest way is to add a specific calss to this sentence... but first there are two contexts...

     

    Context 1... you want to apply the font size to the all TAG

    so lets say that you have you sentence that way (I use a P TAG, but it could be any TAG

    <p>The sentence</p>

    you create and add a class to this TAG that way

    <p class="myclass">The sentence</p>

     

    Context 2... you want to apply a different font size in the middle of a TAG and focus on some words only

    so you will have to add a SPAN TAG containing the class, that way

     

    <p>The <span class="myclass">sentence</span></p>

     

     

     

    now, in both context, you have to declare the class in a CSS sheet, or the STYLE TAG in the header of the HTML document

    problem wit this latter solution is that this CSS class will be available only in this document and not in your entire web site.

    So let's go for instance in this limited solution

    go in between the HEAD TAG in the top of your document and add the following code

    <style>
        .myclass {
            font-size:36px;
        }
    </style>

     

     

    Participant
    October 19, 2021

    Hi Birnou,
    Thank you.
    When I add a <p> to the page it puts too much blank space before the <p>.
    Can I change the amount of space before the <p>or can I use your suggestions somehow without the <p>

    Legend
    October 19, 2021
    quote


    When I add a <p> to the page it puts too much blank space before the <p>.
    Can I change the amount of space before the <p>or can I use your suggestions somehow without the <p>


    By @Harrirt0D44

     

    Use margin/padding to control the spacing:

     

    <p class="myClass">Some text goes here</p>

     

    Css - 0px 0px 0px 0px - Top/Right/Bottom/Left (You dont technically need to include the measurement, in the example case 'px' IF set to 0 BUT include the measurement IF the value is more than zero, example - 10px 15px 10px 15px etc.

     

    Set the css for '.myClass' in your css stylesheet IF you have one attached to your page:

     

    .myClass {

    margin: 0px 0px 0px 0px;

    padding: 0px 0px 0px 0px;

    }

     

    OR wrap the '.myClass' css selector in <style> tags and insert in the block of code in the <head></head> section of your pages code:

     

    <style>

    .myClass {

    margin: 0px 0px 0px 0px;

    padding: 0px 0px 0px 0px;

    }

    </style>