| | #1 |
| HyperActive Warrior War Room Member Join Date: 2011
Posts: 174
Thanks: 27
Thanked 11 Times in 5 Posts
|
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? |
| |
| | #2 |
| HyperActive Warrior War Room Member Join Date: 2012 Location: Finland
Posts: 194
Thanks: 32
Thanked 44 Times in 38 Posts
|
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 |
| | |
| |
| The Following User Says Thank You to Designs1 For This Useful Post: |
| | #3 |
| Advanced Warrior Join Date: 2007 Location: Hong Kong.
Posts: 838
Thanks: 3
Thanked 211 Times in 184 Posts
|
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 | |
| |
| The Following User Says Thank You to Abledragon For This Useful Post: |
| | #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 |
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. |
| |
| The Following 2 Users Say Thank You to David V For This Useful Post: |
| | #5 |
| HyperActive Warrior War Room Member Join Date: 2011
Posts: 174
Thanks: 27
Thanked 11 Times in 5 Posts
|
Thank you!
|
| |
|
| Bookmarks |
| Tags |
| change, font, sentences, specific |
| |