html set font style:HTML text styles-Font Tutorial免费ppt模版下载-道格办公

HTML text styles

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

Like (810)
Reward 支付宝扫一扫 支付宝扫一扫
single-end

Related Suggestion