{"id":256,"date":"2025-07-29T06:27:28","date_gmt":"2025-07-29T06:27:28","guid":{"rendered":"https:\/\/mitalgoswami.in\/?p=256"},"modified":"2025-08-27T06:33:34","modified_gmt":"2025-08-27T06:33:34","slug":"256","status":"publish","type":"post","link":"https:\/\/mitalgoswami.in\/?p=256","title":{"rendered":"What is css?"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Introduction to CSS (Cascading Style Sheets)<\/h3>\n\n\n\n<p><strong>CSS<\/strong> stands for <strong>Cascading Style Sheets<\/strong>. It is a stylesheet language used to describe the <strong>presentation<\/strong> (look and formatting) of a web page written in <strong>HTML<\/strong> or <strong>XML<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"> Purpose of CSS<\/h3>\n\n\n\n<p>CSS controls the <strong>layout<\/strong>, <strong>color<\/strong>, <strong>fonts<\/strong>, <strong>spacing<\/strong>, <strong>animations<\/strong>, and <strong>responsive design<\/strong> of web elements \u2014 making websites more visually attractive and user-friendly.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"> Why Use CSS?<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Feature<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><strong>Separation of concerns<\/strong><\/td><td>Keeps content (HTML) separate from design (CSS)<\/td><\/tr><tr><td><strong>Reusability<\/strong><\/td><td>Same CSS file can style multiple HTML pages<\/td><\/tr><tr><td><strong>Maintainability<\/strong><\/td><td>Easy to update or change styles across the entire site<\/td><\/tr><tr><td><strong>Responsive Design<\/strong><\/td><td>Helps make websites mobile-friendly and flexible<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"> CSS Syntax<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>selector {<br>  property: value;<br>}<br><\/code><\/pre>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<p><code>h1 {<br>  color: blue;<br>  font-size: 24px;<br>}<br><\/code><\/p>\n\n\n\n<p>This code changes the color of all <code>&lt;h1&gt;<\/code> elements to blue and sets their font size to 24px.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Types of CSS<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Inline CSS<\/strong><br>Applied directly to an HTML element using the <code>style<\/code> attribute. <code>&lt;p style=\"color: red;\">This is red text.&lt;\/p><\/code><\/li>\n\n\n\n<li><strong>Internal CSS<\/strong><br>Written inside a <code>&lt;style><\/code> tag within the <code>&lt;head><\/code> section of an HTML document. <code>&lt;style> p { color: green; } &lt;\/style><\/code><\/li>\n\n\n\n<li><strong>External CSS<\/strong><br>Saved in a separate <code>.css<\/code> file and linked to the HTML document. <code>&lt;link rel=\"stylesheet\" href=\"style.css\"><\/code><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Introduction to CSS (Cascading Style Sheets) CSS stands for Cascading Style Sheets. It is a stylesheet language used to describe the presentation (look and formatting) of a web page written in HTML or XML. Purpose of CSS CSS controls the layout, color, fonts, spacing, animations, and responsive design of web elements \u2014 making websites more [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-256","post","type-post","status-publish","format-standard","hentry","category-internet-networking"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=\/wp\/v2\/posts\/256","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=256"}],"version-history":[{"count":2,"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=\/wp\/v2\/posts\/256\/revisions"}],"predecessor-version":[{"id":258,"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=\/wp\/v2\/posts\/256\/revisions\/258"}],"wp:attachment":[{"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=256"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}