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

Advanced crawler - Use of Scrapy_splash component for JS automatic rendering

Table of contents 1. What is scrapy_splash? 2. Th...

Mysql string interception and obtaining data in the specified string

Preface: I encountered a requirement to extract s...

Detailed explanation of MySQL high availability architecture

Table of contents introduction MySQL High Availab...

How to generate Vue user interface by dragging and dropping

Table of contents Preface 1. Technical Principle ...

How to configure ssh/sftp and set permissions under Linux operating system

Compared with FTP, SSH-based sftp service has bet...

How to install MySQL server community version MySQL 5.7.22 winx64 in win10

Download: http://dev.mysql.com/downloads/mysql/ U...

Sharing of experience on repairing MySQL innodb exceptions

A set of MySQL libraries for testing. The previou...

Detailed analysis of the difference between Ref and Reactive in Vue3.0

Table of contents Ref and Reactive Ref Reactive T...

Docker implements re-tagging and deleting the image of the original tag

The docker image id is unique and can physically ...

Example code for converting html table data to Json format

The javascript function for converting <table&g...

Two ways to build a private GitLab using Docker

The first method: docker installation 1. Pull the...

How to use Linux locate command

01. Command Overview The locate command is actual...

How to preview pdf file using pdfjs in vue

Table of contents Preface think Library directory...