[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-686718-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-686718-en":130,"doc-similar-686718":154},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","font-styles-text-styling-layout-styles-guide","Font Styles - Text Styling & Layout Styles Guide","","A practical guide to typography styling and text layout, explaining how font properties and spacing rules shape readability and visual hierarchy. Covers font family fallbacks, web font embedding, and core CSS properties such as color, font-size, font-weight, font-style, text-transform, text-decoration, and text-align. Then details layout control using line-height, letter-spacing, word-spacing, and text-shadow, with examples and best practices to make sizing scalable, predictable, and accessible.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/font-styles-text-styling-layout-styles-guide/686718/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/font-styles-text-styling-layout-styles-guide/686718.png","ImageObject",300,407,{"name":42,"@type":43},"PakDamar76","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-28","2026-11-07",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",6,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What does text styling include in this guide?","Question",{"text":63,"@type":64},"It includes font family, size, weight, and color, plus emphasis and presentation properties like font-style, text-transform, text-decoration, and text-align.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"Why is rem recommended over px and em?",{"text":68,"@type":64},"rem is scalable and predictable because 1rem always equals the root(\u003Chtml>) element font size. px is fixed and not scalable, while em can be tricky because values compound through nested parent elements.",{"name":70,"@type":61,"acceptedAnswer":71},"What is a best practice for line-height in typography?",{"text":72,"@type":64},"Use a unitless value such as 1.6, since it acts as a multiplier of the font size. The recommended range is 1.5–2 for readability.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},686718,1794061497,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,104,109,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":97,"doc_module":4,"doc_module_name":25,"category_name":98,"show_sort_weight":99,"slug":100},5,"Comic",60,"comic",{"id":55,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":102,"slug":103},50,"technology",{"id":105,"doc_module":4,"doc_module_name":25,"category_name":106,"show_sort_weight":107,"slug":108},7,"Healthcare",40,"healthcare",{"id":110,"doc_module":4,"doc_module_name":25,"category_name":111,"show_sort_weight":112,"slug":113},8,"Research & Report",30,"research-report",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},9,"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":97,"slug":129},19,"General","general",{"code":4,"msg":82,"data":131},{"doc_id":79,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":55,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":139,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":80,"read_time":144,"preview_page_count":26,"preview_urls":145},962090893057,"https://ap-avatar.wpscdn.com/davatar_155a257f0dc6eb9ab79c44ca47cae57d","# Font Styles\n\nProperties that affect the font itself.This includesits family,size,weight,and color.Think of this asstyling the character.  \nText Styling is a Tale of Two Categories.  \n# Text Layout Styles\n\n\n|  | line-height   |  |\n| --- | --- | --- |\n| alignment   |  |  |\n\nProperties that affect the spacing and other layoutfeatures of the text.This is about controlling thespace the characters occupy-their alignment,thedistance between lines,words,and letters.  \n`color`:Sets the foreground color of the text.  \n`font-family`:Specifies a typeface for thebrowser to apply to the element.  \n/*From \"Tommy the Cat\"by Primus */p{  \nThe Code  \ncolor:\\#2d3748;/*A dark slate gray */font-family:Georgia,serif;}  \n# Foundation 1:Establishing Identity with Color &Family\n\nThe Result  \nSaid Tommy the Cat as he reeled back toclear whatever foreign matter may have itsway into his mighty throat.Many a fat alley rathad met its demise while staring point blankdown the cavernous barrel of this awesomeprowling machine.Truly a wonder ofmachine.Truly a wonder of naturethis urban predator—Tommy the cat hadmany a story to tell.But it was a rareoccasion such as this that he did.  \n# Pro-Tip:Building Resilient Typography\n\n## 1.Font Stacks(The Fallback Plan)\n\nProvide a list of fonts,from your first choice to ageneric fallback.The browser searches the list untilit finds one available.  \n## 2.Web Fonts (The Guarantee)\n\nUse a service like Google Fonts to embed font filesdirectly.This ensures every user sees the exacttypeface you intended,resolving availability issues.  \n# Foundation 2:Creating Structure with Size &Hierarchy\n\nThe Code  \nThe Result  \n'font-size`:Controls the scale of the text.  \n# Tommy the Cat\n\n## Key Sizing Units\n\nSaid Tommy the Cat as he reeled back to clearwhatever foreign matter may have nestled itsway into his mighty throat.Many a fat alley rathad met its demise while staring point blankdown the cavernous barrel of this awesomeprowling machine...  \n·px(pixels):An absolute,fixed-size unit.  \n·em:Relative to the font size of the direct parentelement.  \n·rem:Relative to the font size of the root(\u003Chtml>)element.  \nh1 {  \nfont-size:2.5rem;}/*40px if root is 16px*/}p{  \nfont-size:1.125rem;}/*18px if root is 16px */}  \n# Why `rem`is the Professional's Choice\n\n## The Problem with`px`\n\nNot scalable.Doesn’t respect user's browserfont size settings for accessibility.  \n## The Problem with`em`\n\n\"The maths can be complicated.\"The valuecompounds based on nested parentelements,making calculations tricky(e.g.,20/24”,or`0.83333333em`).  \n## The `rem`Solution\n\n\"Scalable and predictable.\"1`rem`is alwaysequal to the font size set on the root(\u003Chtml>)element.This simplifies the mental model andmakes global size changes easy.  \nWith`rem`  \nWith`em`  \n# Layering on Emphasis &Style\n\n`font-weight`:Sets the boldness of the  \ntext(e.g.,`normal`,`bold`,`100-900`).  \n`font-style`:Used to apply`italic`or`oblique`styling.  \n`text-transform`:Changes the case oftext(e.g.,`uppercase`,`lowercase`,`capitalize).  \n`text-decoration`:Adds lines to text(e.g.,  \nunderline`,overline`,`line-through`).  \nThis is bold.  \nfont-weight:bold;  \nThis is italic.font-style:italic;  \nTHIS IS UPPERCASE.  \ntext-transform:uppercase;  \nThis is struek.text-decoration:line-through;  \n`text-align`:Controls thehorizontal alignment of text withinits content box.  \nValues  \nLeft  \nright  \ncenter  \njustify  \nh1 {text-align:center;}  \np{text-align:justify;}  \n# Layout 1:Commanding the Flow of Text\n\nTommy the Cat  \nTommy the Cat is the name of myfavorite furry friend.He is a calicocat with big green eyes and a fluffytail.He loves to chase laser point-ers and cuddle on the couch.Everymorning,he wakes me up with agentle purr and a nudge on mynose.He is a cherished member ofour family,bringing joy and war-mth to our home.  \nUse`justify`  \nwith care.It can  \ncreate awkward  \nword spacing,  \nespecially in narrow  \ncolumns.  \n# \"Breathing Room Makes for Better Reading\"in General Sans\n\nThe Code  \nline-height:Set","cbCaio13RiLaUA06","https://ap.wps.com/l/cbCaio13RiLaUA06","pdf",12280855,15,"English","# Font Styles\n## Text Styling: Font Properties\n## Text Layout Styles: Spacing and Alignment\n## Foundation 1: Color & Family\n## Foundation 2: Size & Hierarchy\n## Key Sizing Units\n## Layering on Emphasis & Style\n## Layout 1: Text Flow and Alignment\n## Breathing Room: Line-height and Spacing\n## Adding Depth with Text Shadow","[{\"question\":\"What does text styling include in this guide?\",\"answer\":\"It includes font family, size, weight, and color, plus emphasis and presentation properties like font-style, text-transform, text-decoration, and text-align.\"},{\"question\":\"Why is rem recommended over px and em?\",\"answer\":\"rem is scalable and predictable because 1rem always equals the root(\\u003chtml\\u003e) element font size. px is fixed and not scalable, while em can be tricky because values compound through nested parent elements.\"},{\"question\":\"What is a best practice for line-height in typography?\",\"answer\":\"Use a unitless value such as 1.6, since it acts as a multiplier of the font size. The recommended range is 1.5–2 for readability.\"}]","Font Styles - Text Styling & Layout Styles Guide | PDF",38,[146,150],{"page_no":22,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/71bb6b5b3230eb776bf7378853dd657e.webp",983,548,{"page_no":26,"url":151,"width":152,"height":153},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/6521516755cab1779cdb25617a10ea2f.webp",982,547,{"list":155,"token":11},[156,162,168,174,180,186,192,198,204,211],{"doc_id":157,"doc_title":158,"file_type":137,"home_preview_img_url":159,"slug":160,"view_count":33,"category_name":29,"create_tm":161},701118,"CS193X: Web Programming Fundamentals - Lecture 5 - Spring 2017","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011579050/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=4gwwJGAPO3qvh3%2FyrImnyNamSIQ%3D","cs193x-web-programming-fundamentals-lecture-5-spring-2017",1794523552,{"doc_id":163,"doc_title":164,"file_type":137,"home_preview_img_url":165,"slug":166,"view_count":33,"category_name":29,"create_tm":167},686715,"HTML and CSS Basics - III - CSS review, backgrounds, fonts, and the box model","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230001090598/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=d31078OOAEeV7VL9af56sLZ7Tms%3D","html-and-css-basics-iii-css-review-backgrounds-fonts-and-the-box-model",1794061491,{"doc_id":169,"doc_title":170,"file_type":137,"home_preview_img_url":171,"slug":172,"view_count":97,"category_name":29,"create_tm":173},686720,"Reference-List-Of-CSS-Tags - CSS Reference List","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230001090656/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=ZswSmvAsfZ%2Bc9IOYVU5zHHCTG0I%3D","reference-list-of-css-tags-css-reference-list",1794061498,{"doc_id":175,"doc_title":176,"file_type":137,"home_preview_img_url":177,"slug":178,"view_count":55,"category_name":29,"create_tm":179},703161,"Cascading Style Sheets (CSS) Course Syllabus","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230013426121/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=NyGsd%2Fn%2BRNTCaNbOIpwqPyuHQEE%3D","cascading-style-sheets-css-course-syllabus",1794561905,{"doc_id":181,"doc_title":182,"file_type":137,"home_preview_img_url":183,"slug":184,"view_count":55,"category_name":29,"create_tm":185},702869,"Font Pairings - Typography 1 - Font Pairings","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230012937939/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=i2XJu9%2FNZPdxTogO5v%2BTdwucVKA%3D","font-pairings-typography-1-font-pairings",1794551413,{"doc_id":187,"doc_title":188,"file_type":137,"home_preview_img_url":189,"slug":190,"view_count":55,"category_name":29,"create_tm":191},693037,"Cascading Style Sheets (CSS) - CS142 Lecture Notes - CSS 1 - Driving problem behind CSS","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230004257728/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=Piyp07koNzrqnN2lhFX9FXkmeXc%3D","cascading-style-sheets-css-cs142-lecture-notes-css-1-driving-problem-behind-css",1794246439,{"doc_id":193,"doc_title":194,"file_type":137,"home_preview_img_url":195,"slug":196,"view_count":33,"category_name":29,"create_tm":197},693038,"HTML Styles-CSS - learn cascading style sheets","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230005053917/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=eYfWXsIP2kzzSbHO72GJHele%2BA4%3D","html-styles-css-learn-cascading-style-sheets",1794246445,{"doc_id":199,"doc_title":200,"file_type":137,"home_preview_img_url":201,"slug":202,"view_count":110,"category_name":29,"create_tm":203},703167,"CSS From A To Z - Introduction to CSS - read online free","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230013426264/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=mQ3ikn5KUwdZqOMZ%2FoFCrxCFglk%3D","css-from-a-to-z-introduction-to-css-read-online-free",1794561915,{"doc_id":205,"doc_title":206,"file_type":137,"home_preview_img_url":207,"slug":208,"view_count":209,"category_name":29,"create_tm":210},699463,"HTML5 and CSS3 - Seventh Edition - Visual QuickStart Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010042191/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=7NDVNljAQBoqmwjZ13lcHQ5wLRo%3D","html5-and-css3-seventh-edition-visual-quickstart-guide",12,1794468368,{"doc_id":212,"doc_title":213,"file_type":137,"home_preview_img_url":214,"slug":215,"view_count":55,"category_name":29,"create_tm":216},672869,"Google HTML/CSS Style Guide - Formatting and style rules","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229989673248/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=CPP3Wo9wwEydjOcnNU8xLRDiKXk%3D","google-htmlcss-style-guide-formatting-and-style-rules",1793611799]