Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 11th Jan 2013, 01:20 PM   #1
HyperActive Warrior
War Room Member
 
Join Date: 2011
Posts: 174
Thanks: 27
Thanked 11 Times in 5 Posts
Default
How to change font of specific sentences?
Share on: 
fb share twitter share gplus share more share

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?
Keep Trying is offline  
Unread 11th Jan 2013, 01:42 PM   #2
HyperActive Warrior
War Room Member
 
Designs1's Avatar
 
Join Date: 2012
Location: Finland
Posts: 194
Thanks: 32
Thanked 44 Times in 38 Posts
Default
Re: How to change font of specific sentences?
Share on: 
fb share twitter share gplus share more share

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

Designs1 is offline  
The Following User Says Thank You to Designs1 For This Useful Post:
Unread 11th Jan 2013, 06:19 PM   #3
Advanced Warrior
 
Abledragon's Avatar
 
Join Date: 2007
Location: Hong Kong.
Posts: 838
Thanks: 3
Thanked 211 Times in 184 Posts
Default
Re: How to change font of specific sentences?
Share on: 
fb share twitter share gplus share more share

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>

Cheers,

Martin.

WealthyDragon - Earning My Living Online
Abledragon is offline  
The Following User Says Thank You to Abledragon For This Useful Post:
Unread 11th Jan 2013, 06:40 PM   #4
WP Dev & Design
War Room Member
 
Join Date: 2011
Location: Earth
Posts: 787
Thanks: 92
Thanked 271 Times in 226 Posts
Blog Entries: 4
Default
Re: How to change font of specific sentences?
Share on: 
fb share twitter share gplus share more share

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,
and...
Some people (designers, developers) will instantly notice the unprofessional amateur usage of fonts.

Just some friendly advice.
David V is offline  
The Following 2 Users Say Thank You to David V For This Useful Post:
Unread 12th Jan 2013, 09:11 PM   #5
HyperActive Warrior
War Room Member
 
Join Date: 2011
Posts: 174
Thanks: 27
Thanked 11 Times in 5 Posts
Default
Re: How to change font of specific sentences?
Share on: 
fb share twitter share gplus share more share

Thank you!
Keep Trying is offline  
Closed Thread


Bookmarks

Tags
change, font, sentences, specific


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 09:39 PM.