Home arrow HTML arrow Page 3 - Working with the Google Font API`s bolditalic Argument
HTML

Working with the Google Font API`s bolditalic Argument


In this seventh part of the series, I demonstrate how to work with the “bolditalic” argument included with Google’s Font API. The use of the argument is very similar to its counterparts “italic” and “bold” discussed in previous articles, so understanding its underlying logic is truly a breeze.

Author Info:
By: Alejandro Gervasio
Rating: 5 stars5 stars5 stars5 stars5 stars / 2
June 29, 2010
TABLE OF CONTENTS:
  1. · Working with the Google Font API`s bolditalic Argument
  2. · Review: the b shorthand
  3. · Using the bolditalic option
  4. · Seeing the bolditalic argument in action

print this article
SEARCH DEVARTICLES

Working with the Google Font API`s bolditalic Argument - Using the bolditalic option
(Page 3 of 4 )

Using the “bolditalic” option referenced in the preceding segment is very similar to working with other font modifiers discussed previously. For example, say that you need to simultaneously request the italic and bold styles of the “Cantarell” font. In a case like this, the Font API should be queried in the following manner:

<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Cantarell:bolditalic|Nobile" />

There you have it. By simply appending the “bolditalic” argument to the name of the requested font, it’s possible to have at your disposal its italic and bold styles at the same. What’s more, once the font has been properly downloaded, using it to decorate some HTML elements is reduced to coding the following CSS styles:

h1 {

    font: normal 46px 'Cantarell', Helvetica, sans-serif;

    color: #00f;  

}

h2 {

    font: normal 40px 'Cantarell', Helvetica, sans-serif;

    color: #ff8040;  

}

h3 {

    font: normal 32px 'Cantarell', Helvetica, sans-serif;

    color: #ff8040;

}

p {

    font: normal 14px 'Nobile', Helvetica, serif;

}

It's so simple to understand how the previous CSS styles do their business that we needn't discuss it further. What we do need to do now, however, is include the styles in a web page. In this way you’ll be able to see the actual functionality of the “bolditalic” argument when used with the group of selectors coded before.

The full details of this process will be discussed in the next section. To learn more, click on the link that appears below and keep reading.


blog comments powered by Disqus
HTML ARTICLES

- Does HTML5 Need a Main Element?
- Revisiting the HTML5 vs. Native Debate
- HTML5: Not for Phone Apps?
- HTML5 or Native?
- Job Hunting? Freelancer.com Lists This Quart...
- HTML5 in the News
- Report: HTML5 Mobile Performance Lags
- The Top HTML5 Audio Players
- Top HTML5 Video Tutorials
- HTML5: Reasons to Learn and Use It
- More of the Top Tutorials for HTML5 Forms
- MobileAppWizard Releases HTML5 App Builder
- HTML5 Boilerplate: Working with jQuery and M...
- HTML5 Boilerplate Introduction
- New API Platform for HTML5

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials