Add unlimited fonts to your website with Google Web Fonts

Add unlimited fonts to your website with Google Web Fonts

For a long time, website development was hampered by the fact that they could only use a handful of fonts because of their resources. However, now Google has launched a new web service "Google Web Fonts". The service allows you the possibility to use different fonts from Google on your website. There are no restrictions on the fonts used.

Here is a short description how you can do it in a few steps:

Choose a font

To do this, open Google http://www.google.com/webfonts and choose one you like.

選擇谷歌字體

Get the selected font code

In this example, the "Eater" font will be used. To get the font code, you need to do this on the open page:

代碼谷歌字體

Then you need to add the "/" tag to avoid validation errors in HTML. Therefore, it should be:

Copy code
The code is as follows:

<link href='http://fonts.googleapis.com/css?family=Eater' rel='stylesheet' type='text/css' />

Copy the above code and put it after the <HEAD> tag like this:

Copy code
The code is as follows:

<head>
<link href='http://fonts.googleapis.com/css?family=Eater' rel='stylesheet' type='text/css'/>
...
<!-- other HTML code -->
...

Add CSS code to your web page

Now you can use this font by setting the property "font-family" in CSS. For example, if you want all first-level headings to have the same font, you have to add the following CSS style:

Copy code
The code is as follows:

h1
{
font-family: 'Eater', cursive;
}

<<:  A brief analysis of whether using iframe to call a page will cache the page

>>:  Details of the order in which MySQL reads my.cnf

Recommend

MySQL infobright installation steps

Table of contents 1. Use the "rpm -ivh insta...

Solution to forgetting mysql password under linux

The problem is as follows: I entered the command ...

Implementation of CSS sticky footer classic layout

What is a sticky footer layout? Our common web pa...

Tutorial on using $attrs and $listeners in Vue

Table of contents introduce Example Summarize int...

Understanding and using React useEffect

Table of contents Avoid repetitive rendering loop...

Summary of methods for cleaning Mysql general_log

Method 1: SET GLOBAL general_log = 'OFF';...

The difference between Input's size and maxlength attributes

I recently used the input size and maxlength attri...

Vue defines private filters and basic usage

The methods and concepts of private filters and g...

Vue implements chat interface

This article example shares the specific code of ...

Example code for evenly distributing elements using css3 flex layout

This article mainly introduces how to evenly dist...

How to use time as a judgment condition in MySQL

Background: During the development process, we of...

Using vue3 to imitate the side message prompt effect of Apple system

Table of contents Animation Preview Other UI Libr...

The difference between the four file extensions .html, .htm, .shtml and .shtm

Many friends who have just started to make web pag...