How to change font of specific sentences?

4 replies
  • |
Hi I know this might be a newbie question but I tried doing <font face="Arial>[Insert Sentence Here]</font> but it didn't work.

Then I realized that HTML 4 no longer works anymore now that we use HTML 5. I liked using that method because it was easy to change in your WordPress HTML editor.

Since most of my body paragraphs are in Times New Roman, I would just like to change some of my sentences to Arial to make them standout.

But I'm not sure how to do it with CSS.

Do you know how I change the font a specific sentence?
#change #font #sentences #specific
  • Profile picture of the author Designs1
    You can try this:

    <span> Your text </span>

    then add this to CSS

    span {
    font-family: Arial;

    if you want to do multiple spans

    <span class="classname"> Your text </span>
    <span class="classname2"> Your text </span>

    .classname {
    font-family: Arial;

    .classname2 {
    font-family:"Times New Roman",Georgia,Serif;

    Hopefully this helps
    {{ DiscussionBoard.errors[7590403].message }}
  • Profile picture of the author Abledragon
    The correct in-line CSS for a few words is: <span style="font-family: arial;">Your sentence here</span>

    If you want a paragraph in a different font the in-line CSS is: <p style="font-family: arial;">Your sentence here</p>


    WealthyDragon - Earning My Living Online
    {{ DiscussionBoard.errors[7591377].message }}
  • Profile picture of the author David V
    While this really is not a "how to do it" answer, I would strongly advice against doing this.
    Mixing fonts like that, especially within a block of body text violates every rule in the book about design and topography.
    There are better ways to emphasize the text
    If you decide to change the font mid-stream like that here's what you'll find:
    Some people will notice the emphasis,
    Some people will notice subconsciously that something is really wrong,
    Some people (designers, developers) will instantly notice the unprofessional amateur usage of fonts.

    Just some friendly advice.
    {{ DiscussionBoard.errors[7591439].message }}
  • Profile picture of the author Keep Trying
    Thank you!
    {{ DiscussionBoard.errors[7595581].message }}

Trending Topics