Typography is a way you can use to add more meaning to content. It supports balance, hierarchy, white space and good design. The following is an example of CSS typography. Moreover, you can download a font from Google fonts .
@font-face { font-family: 'PTSans'; src: url('./fonts/PT-Sans/PT-Sans.eot'); src: url('./fonts/PT-Sans/PT-Sans.eot?#iefix') format('embedded-opentype'), url('./fonts/PT-Sans/PT-Sans.woff') format('woff'), url('./fonts/PT-Sans/PT-Sans.ttf') format('truetype'), url('./fonts/PT-Sans/PT-Sans.svg#pt_sansregular') format('svg'); font-weight: normal; font-style: normal; } @font-face { font-family: 'PTSans'; src: url('./fonts/PT-Sans/PT-Sans-Bold.eot'); src: url('./fonts/PT-Sans/PPT-Sans-Bold.eot?#iefix') format('embedded-opentype'), url('./fonts/PT-Sans/PT-Sans-Bold.woff') format('woff'), url('./fonts/PT-Sans/PT-Sans-Bold.ttf') format('truetype'), url('./fonts/PT-Sans/PT-Sans-Bold.svg#pt_sansbold') format('svg'); font-weight: bold; font-style: normal; } @font-face { font-family: 'PTSans'; src: url('./fonts/PT-Sans/PT-Sans-Italic.eot'); src: url('./fonts/PT-Sans/PPT-Sans-Italic.eot?#iefix') format('embedded-opentype'), url('./fonts/PT-Sans/PT-Sans-Italic.woff') format('woff'), url('./fonts/PT-Sans/PT-Sans-Italic.ttf') format('truetype'), url('./fonts/PT-Sans/PT-Sans-Italic.svg#pt_sansitalic') format('svg'); font-weight: normal; font-style: italic; } @font-face { font-family: 'PTSans'; src: url('./fonts/PT-Sans/PT-Sans-BoldItalic.eot'); src: url('./fonts/PT-Sans/PPT-Sans-BoldItalic.eot?#iefix') format('embedded-opentype'), url('./fonts/PT-Sans/PT-Sans-BoldItalic.woff') format('woff'), url('./fonts/PT-Sans/PT-Sans-BoldItalic.ttf') format('truetype'), url('./fonts/PT-Sans/PT-Sans-BoldItalic.svg#pt_sansbold_italic') format('svg'); font-weight: bold; font-style: italic; } .font{ display: block; font-family: 'PTSans', sans-serif; font-weight: normal; font-style: italic; font-size: 108%; text-align: center; text-shadow: 1px 1px 0px rgba(0, 0, 0, .7); text-transform: lowercase; text-indent: 25px; text-decoration: underline; line-height: 1.4; letter-spacing: 4px; word-spacing: 10px; background-color: #FFF; color: #000; }
Related Resource CSS Typography Template
source share