+ 1

when applying font style directly from google font family, anyone: what should be assigned in "placeholder"?

within scope of CSS styles

17th Jun 2016, 6:26 AM
Alexis Cheuk Yan Lee
Alexis Cheuk Yan Lee - avatar
2 Answers
+ 2
When doing this from google they will actually have it written for you all you have to do is copy and paste but here is what it would look like in your html you will have to add this link in the head, <link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'> this link will vary based on what font you choose, next you will add the font family in your css font-family: 'Open Sans', sans-serif; its good to place fall backs when providing a font so if for some reason your font isn't compatible with the users device you will provide another typeface that will show instead of font-family: 'Open Sans', Arial, sans-serif; indicating if Open Sans doesnt work to use arial if not arial then a standard sans serif type will apply Also, only include the font style you want from google because choosing many that wouldn't use in your site will increase your page load time
17th Jun 2016, 3:47 PM
Matt
+ 1
25062019 Matt: - when I posted this question, it was 3 years ago. I was trying different fonts in html. Good fonts make web pages looks exptionally stylish of your own. - Today, I tend to agree with your last comment. Reason is devices and applications now have optional fonts selection. So why bother to stick to yours? - I selected about 8 fonts from googlefonts family. Very rare would I really have to use them. And there are over thousand font types in googlefonts, and I am talking about english only. See I may need few more foreign languages like chinese, russian, and others?
25th Jun 2019, 10:08 AM
Alexis Cheuk Yan Lee
Alexis Cheuk Yan Lee - avatar