HTML and CSS Reference
In-Depth Information
Changing Typography
While this word sounds pretty “old school”, it is simply the field of using different styles
of letters, and arranging them in pleasing ways. Basically every printed thing that you have
ever read, online and offline, has incorporated typography in its creation.
You might think that the way letters and words are put down isn't really important, or that
it's easy to do. It's true that writing out some text and publishing it is pretty easy. However,
there is a huge amount of time, skill, and effort that goes into creating the perfect typography
for publications, like websites. Choosing something that looks great, is formatted appropri-
ately to complement the rest of the content on a page — and possibly most importantly, is
easy to read — is an art all of its own.
There are heaps of different fonts that are freely available online, and your different applic-
ations will come with their own as well, as with Word. For this part of the guide, you will
be using a pretty basic, and popular, font that is called Droid Sans, from the Google Fonts
archive.
Remember how the “<head>” tags can be used to contain a range of different information?
To change the font on the form and blog post that you have created, you simply need to
insert a little bit of code in the “<head>” tags of your HTML files:
< link href='http://fonts.googleapis.com/css?family=Droid+Sans' rel='stylesheet' type='text/css' >
Once you have done this, you have actually used what is likely your first bit of CSS. This is
a type of coding that is used to improve the look of webpages. In this case, you have used
CSS to choose a better font.
Once you have added this line of code in between your “<head>” tags, you will notice that
the font has changed, when you open the file with a web browser.
Search WWH ::




Custom Search