Use the Google font to add the font to your website in a simple way

Source: Internet
Author: User

For a long time, website development was affected because of their resources, they can only use a few fonts.However, Google Now launches a new Web Service "Google Web Fonts ".This service allows you to use different fonts on your website from Google's possibilities.There are no restrictions on the font used.

The following is a brief description of how you can perform the following steps:

Select font

To do this, Open googleHttp://www.google.com/webfontsSelect one you like.

Obtain the selected fontCode

In this example, the eater font is used.To obtain the font code, you need to do the following on the open page:

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

<LinkHref= 'HTTP: // fonts.googleapis.com/css? Family = eater'REL= 'Stylesheet'Type= 'Text/CSS'/>

After the above Code is copied and its label is

<Head><LinkHref= 'HTTP: // fonts.googleapis.com/css? Family = eater'REL= 'Stylesheet'Type= 'Text/CSS'/>...<! --Other HTML code-->...
Add CSS code to Your webpage

Now you can use this font to set the attribute "font family" in CSS ".For example, if you want to font all the first-level titles, you must add the following CSS styles:

H1 {font-family: 'eater ', cursive ;}

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.