[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-693034-105":59,"doc-detail-693034-en":130,"doc-similar-693034":186},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","css-handbook","CSS Handbook","","CSS Handbook provides a structured introduction to Cascading Style Sheets, explaining how CSS rules are built and how selectors, declarations, and layout properties work together to style HTML. It guides readers through core concepts such as cascade, specificity, inheritance, and common value functions, then expands into practical layout systems including Flexbox and CSS Grid. The handbook also covers modern features like variables, nesting, logical properties, container queries, cascade layers, and best practices for performance and accessibility.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/css-handbook/693034/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/css-handbook/693034.png","ImageObject",300,407,{"name":92,"@type":93},"Eliana","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-16","2026-11-09",true,{"@type":102,"interactionType":103,"userInteractionCount":24},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What is CSS and what does it do in a web page?","Question",{"text":112,"@type":113},"CSS is an abbreviation for Cascading Style Sheets. It styles HTML elements and instructs the browser how to render those elements on the page.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"How are CSS rules structured?",{"text":117,"@type":113},"A CSS rule consists of a selector and a declaration block. The declaration block includes one or more declarations, each made of a property and a value pair.",{"name":119,"@type":110,"acceptedAnswer":120},"What are the main layout tools covered in the handbook?",{"text":121,"@type":113},"The handbook covers Flexbox and CSS Grid, including common patterns and configuration details such as grid-area and span.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},693034,1794246437,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":24,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":129,"read_time":144,"preview_page_count":52,"preview_urls":145},4398048949847,"https://ap-avatar.wpscdn.com/avatar/400002536579ef2da7f?_k=1778318612642679267","CSS Handbook  \nFlavio Copes  \nUpdated November 9, 2026  \nContents  \nPreface 3  \nLegal 3  \nIntroduction 3  \nHow does CSS look like 4  \nA brief history of CSS 5  \nAdding CSS to an HTML page 5  \nSelectors 5  \nCascade 9  \nSpecificity 10  \nHow to calculate specificity 10  \nInheritance 13  \nImport 15  \nAttribute selectors 15  \nPseudo-classes 16  \nPseudo-elements 17  \nColors 18  \nUnits 23  \nurl() 24  \ncalc() 25  \nBackgrounds 26  \nComments 28  \nFonts 28  \nTypography 33  \nBox Model 39  \nBorder 40  \nPadding 44  \nMargin 45  \nBox Sizing 46  \nDisplay 47  \nPositioning 48  \nFloating and clearing 57  \nz-index 57  \nLists 58  \nError handling 59  \nFlexbox 59  \nContainer properties ............................................ 60  \nProperties that apply to each single item ................................. 66  \nCommon Flexbox Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68  \nCSS Grid 68  \nThe basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69  \nUsing grid-area as a shorthand ..................................... 77  \nUsing span ................................................. 77  \nMore grid configuration .......................................... 78  \nFill a page with a grid ........................................... 80  \nAn example: header, sidebar, content and footer ............................ 80  \nCommon Grid Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82  \nCustom Properties (or CSS Variables) 83  \nModern CSS Features 86  \nCSS Nesting ................................................. 86  \nCSS Logical Properties ........................................... 86  \nModern Color Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86  \nContainer Queries ............................................. 87  \nCSS Cascade Layers ............................................ 87  \nMedia types 87  \nMedia queries 89  \nFeature queries 91  \nContainer Queries 92  \nCSS Best Practices 93  \nOrganization & Architecture ....................................... 93  \nPerformance Optimization ......................................... 94  \nModern CSS Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95  \nAccessibility Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95  \nConclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96  \nPreface  \nThis book aims to be an introduction to the CSS fundamentals.  \nThis book was first published 2019 .  \nLast updated in 2025 .  \nLegal  \nFlavio Copes, 2025 . All rights reserved.  \n[Downloaded from](Downloaded from flaviocopes.com)[ flaviocopes.com](Downloaded from flaviocopes.com).  \nNo part of this book may be reproduced, distributed, or transmitted in any form or by any means, including photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the publisher.  \nThe information in this book is for educational and informational purposes only and is not intended as legal, financial, or other professional advice. The author and publisher make no representations as to the accuracy, completeness, suitability, or validity of any information in this book and will not be liable for any errors, omissions, or delays in this information or any losses, injuries, or damages arising from its use.  \nThis book is provided free of charge to the newsletter subscribers of Flavio Copes. It is for personal use only. Redistribution, resale, or any commercial use of this book or any portion of it is strictly prohibited without the prior written permission of the author.  \nIf you wish to share a portion of this book, please provide proper attribution by crediting Flavio [Copes and including a link to](Copes and including a link to flaviocopes.com)[ flaviocopes.com](Copes and incl","cbCaihu52JPX834O","https://ap.wps.com/l/cbCaihu52JPX834O","pdf",502917,97,"English","# Preface\n# Legal\n# Introduction\n# How does CSS look like\n# A brief history of CSS\n# Adding CSS to an HTML page\n# Selectors\n# Cascade\n## Specificity\n## Inheritance\n## Import\n## Attribute selectors\n## Pseudo-classes\n## Pseudo-elements\n# Colors and Units\n## url() and calc()\n# Backgrounds and Comments\n# Fonts and Typography\n# Box Model\n## Border, Padding, Margin\n## Box Sizing\n# Display\n# Positioning\n## Floating and clearing\n# z-index\n# Lists\n# Error handling\n# Flexbox\n## Container properties\n## Common Flexbox Patterns\n# CSS Grid\n## The basics\n## Common Grid Patterns\n# Custom Properties (CSS Variables)\n# Modern CSS Features\n## CSS Nesting\n## CSS Logical Properties\n## Modern Color Functions\n## Container Queries\n## CSS Cascade Layers\n# CSS Best Practices\n## Organization & Architecture\n## Performance Optimization\n## Accessibility Considerations\n# Conclusion","[{\"question\":\"What is CSS and what does it do in a web page?\",\"answer\":\"CSS is an abbreviation for Cascading Style Sheets. It styles HTML elements and instructs the browser how to render those elements on the page.\"},{\"question\":\"How are CSS rules structured?\",\"answer\":\"A CSS rule consists of a selector and a declaration block. The declaration block includes one or more declarations, each made of a property and a value pair.\"},{\"question\":\"What are the main layout tools covered in the handbook?\",\"answer\":\"The handbook covers Flexbox and CSS Grid, including common patterns and configuration details such as grid-area and span.\"}]","CSS Handbook | PDF",244,[146,150,154,158,162,166,170,174,178,182],{"page_no":8,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/f0314f3474005ef728abbd0746dda48b.webp",983,1390,{"page_no":14,"url":151,"width":152,"height":153},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/ad2f9b9c9db5c10424c4b5c96c4c4821.webp",982,1388,{"page_no":81,"url":155,"width":156,"height":157},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/069a5db817c4ff6bd8e7d74e7283c546.webp",981,1387,{"page_no":19,"url":159,"width":160,"height":161},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/08885f7c7edbb4447dc3c4acb6a4589d.webp",980,1385,{"page_no":24,"url":163,"width":164,"height":165},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/3fc59777da2caee47055e7a7bd7992f2.webp",979,1384,{"page_no":29,"url":167,"width":168,"height":169},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/e73a63597f7df9b2114eef3efb57e4c9.webp",978,1383,{"page_no":34,"url":171,"width":172,"height":173},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/20ff9810e99b42497ccdc25a81f96abc.webp",977,1381,{"page_no":39,"url":175,"width":176,"height":177},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/3fe69712217d501bdd1b38aa609f829d.webp",976,1380,{"page_no":44,"url":179,"width":180,"height":181},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/94cbaab9b944b5ab59cddea315263d2f.webp",975,1378,{"page_no":52,"url":183,"width":184,"height":185},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/a33e2c231428037c6b4a3f0ccb5880ac.webp",974,1377,{"list":187,"token":66},[188,194,200,206,212,218,224,230,236,242],{"doc_id":189,"doc_title":190,"file_type":137,"home_preview_img_url":191,"slug":192,"view_count":29,"category_name":30,"create_tm":193},699464,"Basic CSS - Lecture 4 - CSS Styling Fundamentals","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010042266/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=8NSxiPH2GSPijgEC62uPA3Jcllw%3D","basic-css-lecture-4-css-styling-fundamentals",1794468368,{"doc_id":195,"doc_title":196,"file_type":137,"home_preview_img_url":197,"slug":198,"view_count":81,"category_name":30,"create_tm":199},686721,"CSS - Applying Basic Styles","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230001090655/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=9u2kTIYmhKwAh7kMa3qSw1zFFnU%3D","css-applying-basic-styles",1794061500,{"doc_id":201,"doc_title":202,"file_type":137,"home_preview_img_url":203,"slug":204,"view_count":29,"category_name":30,"create_tm":205},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=1796111999&Signature=bKEhzavb4mMRJaDMluUHhxW4M7I%3D","cascading-style-sheets-css-cs142-lecture-notes-css-1-driving-problem-behind-css",1794246439,{"doc_id":207,"doc_title":208,"file_type":137,"home_preview_img_url":209,"slug":210,"view_count":29,"category_name":30,"create_tm":211},699461,"CSS Cascading Style Sheets - Basic CSS Properties Syntax and Usage","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011003513/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=xkp1JaDDvbAiIou13vf00%2BgWpM8%3D","css-cascading-style-sheets-basic-css-properties-syntax-and-usage",1794468363,{"doc_id":213,"doc_title":214,"file_type":137,"home_preview_img_url":215,"slug":216,"view_count":29,"category_name":30,"create_tm":217},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=1796111999&Signature=ER1ERSd5hCOyvY4qE9DkuchP%2Bww%3D","cascading-style-sheets-css-course-syllabus",1794561905,{"doc_id":219,"doc_title":220,"file_type":137,"home_preview_img_url":221,"slug":222,"view_count":29,"category_name":30,"create_tm":223},685839,"DCA-04 Block 2 - WEB-DESIGN - Unit-3 - Getting Started With CSS","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000223066/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=A35ysAM%2ByEb7PdnzMQ6re4%2BtX4g%3D","dca-04-block-2-web-design-unit-3-getting-started-with-css",1794019251,{"doc_id":225,"doc_title":226,"file_type":137,"home_preview_img_url":227,"slug":228,"view_count":19,"category_name":30,"create_tm":229},699459,"Unit 3 - Cascading Style Sheets (CSS) - Lecture","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011003387/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=brdp98BO9zrvHwCxh0UuJRHkaOk%3D","unit-3-cascading-style-sheets-css-lecture",1794468356,{"doc_id":231,"doc_title":232,"file_type":137,"home_preview_img_url":233,"slug":234,"view_count":235,"category_name":30,"create_tm":193},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=1796111999&Signature=%2FfR9sQp1gRS%2FRDjMOdYac%2FirUQ0%3D","html5-and-css3-seventh-edition-visual-quickstart-guide",12,{"doc_id":237,"doc_title":238,"file_type":137,"home_preview_img_url":239,"slug":240,"view_count":39,"category_name":30,"create_tm":241},697991,"Learn to Code - HTML & CSS - Develop & Style Websites","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010150974/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=3xlqU0iC%2F2vcJN1eu8MtvfLXylk%3D","learn-to-code-html-css-develop-style-websites",1794446750,{"doc_id":243,"doc_title":244,"file_type":137,"home_preview_img_url":245,"slug":246,"view_count":19,"category_name":30,"create_tm":247},681941,"HTML & CSS - Course Material - Hamburg Coding School - January 2022","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229999293280/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=aETjJoxeqAYaDV1SN%2BZ6jARQf60%3D","html-css-course-material-hamburg-coding-school-january-2022",1793957200]