The font property can be used as a shorthand for the font-style, font-variant, font-weight, font-size, line-height and font-family properties, or to set the element's font to the system font.
Font modification
- font-family attribute: Set the font in the HTML page
- font-size attribute: set the font size
- font-weight attribute: set the thickness of the font
- font-style attribute: set the specified font style
font-familyExample of writing:
<style> ;
Effect:
This size is the effect of browser enlargement, not a change to the font
font-sizeExample of writing:
<style> Grade 9 Qijia Class</ p> </body>
Effect:
font-weight Writing example:
<style> <body> <p>Level 19 Qijia class</p> </body>Effect:
Introduce web fonts
The keyword @font-face can be introduced from Fonts downloaded from the Internet are used in HTML.
Writing example:
<style> /*Set the font style for an element, each browser has a default font*/ 'runzhi'; src:url('font/Yuwei calligraphy Yunmo Simplified.ttf') ; font-weight: 400; font-style: normal; } } /*Set the font style for an element. The following code is set to What is the name of FONT-FAMILY introduced on the font? What is the name? start">Effect:
Articles are uploaded by users and are for non-commercial browsing only. Posted by: Lomu, please indicate the source: https://www.daogebangong.com/en/articles/detail/HTML-de-wen-zi-yang-shi.html
评论列表(196条)
测试