Fonts in css with example

CSS 3 cascading style sheets

How to apply Fonts in css with example


CSS – Cascading Style Sheet In this lecture you will learn Font setting and how to usage custom fonts for your html web page In CSS, there are two types of font family names: generic family - a group of font families with a similar look (like "Serif" or "Monospace") font family - a specific font family (like "Times New Roman" or "Arial") Font Family The font family of a text is set with the font-family property. The font-family property should hold several font names as a "fallback" system. If the browser does not support the first font, it tries the next font, and so on. Start with the font you want, and end with a generic family, to let the browser pick a similar font in the generic family, if no other fonts are available. for instance fonts css examples with source code here: <!DOCTYPE html> <html> <head> <style> .serif { font-family: "Times New Roman", Times, serif; } .sansserif { font-family: Arial, Helvetica, sans-serif; } .monospace { font-family: "Lucida Console", Courier, monospace; } </style> </head> <body> <h1>CSS font-family</h1> <p class="serif">This is a paragraph, shown in the Times New Roman font.</p> <p class="sansserif">This is a paragraph, shown in the Arial font.</p> <p class="monospace">This is a paragraph, shown in the Lucida Console font.</p> </body> </html>

in the above shown example applied fonts in css to a html tag elements, in this example source code written in p tag is applied on style attribute with parameters are having with their values.
similarly one p tag of html element is also applied for fonts

front end design

css

Web development course Data Science courses: Web Development
Online courseOnline Courses: Include Certification
Harisystems is optimized for learning, testing and training. courses are designed to be simplified to improve reading and basic understanding for beginners to expert level. Tutorials and examples are constantly reviewed to avoid errors, however we cannot warrant full correctness of all content. if any found need to correct write us at info@harisystems.com. we Harisystems is not responsible for any with this tutorials, While using this site, you agree to have read and accepted our terms of use, cookie and privacy policy. Copyright 2007-2023 by Harisystems. All Rights Reserved.
Copyright © Harisystems 2023