{"id":1296,"date":"2021-12-29T15:49:29","date_gmt":"2021-12-29T15:49:29","guid":{"rendered":"https:\/\/swatilathia.wordpress.com\/?page_id=1296"},"modified":"2024-12-18T05:17:27","modified_gmt":"2024-12-18T05:17:27","slug":"css-tutorial-1","status":"publish","type":"page","link":"https:\/\/swatilathia.com\/?page_id=1296","title":{"rendered":"CSS Tutorial"},"content":{"rendered":"<body>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_83 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a14b5c53ac6d\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a14b5c53ac6d\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/swatilathia.com\/?page_id=1296\/#What_is_CSS\" >What is CSS?<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/swatilathia.com\/?page_id=1296\/#Types_of_Style_Sheets\" >Types of Style Sheets<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/swatilathia.com\/?page_id=1296\/#Internal_CSS\" >Internal CSS<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/swatilathia.com\/?page_id=1296\/#Inline_CSS\" >Inline CSS<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/swatilathia.com\/?page_id=1296\/#External_CSS\" >External CSS<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/swatilathia.com\/?page_id=1296\/#CSS_Selectors\" >CSS Selectors<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/swatilathia.com\/?page_id=1296\/#The_CSS_element_Selector\" >The CSS element Selector<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/swatilathia.com\/?page_id=1296\/#The_CSS_id_Selector\" >The CSS id Selector<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/swatilathia.com\/?page_id=1296\/#The_CSS_class_Selector\" >The CSS class Selector<\/a><\/li><\/ul><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/swatilathia.com\/?page_id=1296\/#CSS_Font_Property\" >CSS Font Property<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/swatilathia.com\/?page_id=1296\/#CSS_Text_Property\" >CSS Text Property<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/swatilathia.com\/?page_id=1296\/#CSS_Background_Property\" >CSS Background Property<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/swatilathia.com\/?page_id=1296\/#CSS_Border_Property\" >CSS Border Property<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/swatilathia.com\/?page_id=1296\/#CSS_List_Property\" >CSS List Property<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/swatilathia.com\/?page_id=1296\/#CSS_Margin_Properties\" >CSS Margin Properties<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/swatilathia.com\/?page_id=1296\/#CSS_comments\" >CSS comments<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/swatilathia.com\/?page_id=1296\/#CSS_Pseudo_Class\" >CSS Pseudo Class<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/swatilathia.com\/?page_id=1296\/#Anchor_Pseudo_Classes\" >Anchor Pseudo Classes<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/swatilathia.com\/?page_id=1296\/#CSS_Pseudo-elements\" >CSS&nbsp;Pseudo-elements<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/swatilathia.com\/?page_id=1296\/#CSS_Media_Query\" >CSS Media Query<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/swatilathia.com\/?page_id=1296\/#Responsive_Web_Design_%E2%80%93_Images\" >Responsive Web Design &#8211; Images<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h1 class=\"wp-block-heading\" id=\"what-is-css\"><span class=\"ez-toc-section\" id=\"What_is_CSS\"><\/span>What is CSS?<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"has-medium-font-size\">CSS stands for Cascading Style Sheets<\/li>\n\n\n\n<li class=\"has-medium-font-size\">CSS describes how HTML elements are to be displayed<\/li>\n\n\n\n<li class=\"has-medium-font-size\">CSS saves a lot of work<\/li>\n\n\n\n<li class=\"has-medium-font-size\">It can control the layout of multiple web pages all at once<\/li>\n\n\n\n<li class=\"has-medium-font-size\">External style sheets are stored in CSS files<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>CSS Syntax<\/strong> : A CSS file consists of a selector and a declaration block as follows<\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>H1 {\n    color:red;\n    font-size:15px;\n   }<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li>Here color &amp; font-size are property of <strong>h1<\/strong> where red &amp; 15px are their values respectively. Here h1 is selector that you want to style.<\/li>\n\n\n\n<li>The declaration block contains one or more declarations separated by semicolons.<\/li>\n\n\n\n<li>Each declaration includes a CSS property name and a value, separated by a colon.<\/li>\n\n\n\n<li>Multiple CSS declarations are separated with semicolons, and declaration blocks are surrounded by curly braces.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\">Example: In this example all &lt;p&gt; elements will be center-aligned, with a blue text color<\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n&lt;head&gt;\n&lt;style&gt;\n      p {\n          color: blue;\n          text-align: center;\n        }  \n&lt;\/style&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n      &lt;p&gt;Hello BCA semester 1 Students!!!&lt;\/p&gt;\n      &lt;p&gt;We are using css to style p tag&lt;\/p&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong><em>p<\/em><\/strong> is a selector in CSS. It is nothing but HTML element you want to style: &lt;p&gt;<\/li>\n\n\n\n<li><strong><em>color<\/em><\/strong> is a property, and blue is the property value.<\/li>\n\n\n\n<li><strong><em>text-align<\/em><\/strong> is a property, and center is the property value.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"types-of-style-sheets\"><span class=\"ez-toc-section\" id=\"Types_of_Style_Sheets\"><\/span>Types of Style Sheets<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li>There are 3 types of style sheets :<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list has-medium-font-size\">\n<li>Internal CSS<\/li>\n\n\n\n<li>Inline CSS<\/li>\n\n\n\n<li>External CSS<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Internal_CSS\"><\/span><strong>Internal CSS<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li>If you want to style only single HTML web page with unique style, an internal style sheet may be used.<\/li>\n\n\n\n<li>The internal style is defined inside the &lt;style&gt; element, inside the &lt;head&gt;.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n      &lt;head&gt;\n      &lt;style&gt;\n              body {\n                    background-color: cyan;\n                    }\n              h1 {\n                     color: purple;\n                     margin-left: 40px;\n                 } \n      &lt;\/style&gt;\n      &lt;\/head&gt;\n      &lt;body&gt;\n\t\t&lt;h1&gt;This is Bhavan\u2019s H J Doshi I T Institute Jamnagar&lt;\/h1&gt;\n                &lt;p&gt;This is a paragraph demo.&lt;\/p&gt;\n      &lt;\/body&gt;\n&lt;\/html&gt;\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Inline_CSS\"><\/span><strong>Inline CSS<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li>If you want a unique style for a single element, an inline style may be used to apply .<\/li>\n\n\n\n<li>To use inline styles, add the style attribute to the relevant element.<\/li>\n\n\n\n<li>The style attribute can contain any CSS property.<\/li>\n\n\n\n<li>Inline styles are defined within the \u201cstyle\u201d attribute of the relevant element.<\/li>\n<\/ul>\n\n\n\n<p><strong>Example<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n&lt;body&gt;\n       &lt;h1 style=\"color:blue;text-align:center;\"&gt;This is a heading&lt;\/h1&gt;\n       &lt;p style=\"color:red;\"&gt;This is a paragraph.&lt;\/p&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"External_CSS\"><\/span><strong>External CSS<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li>Use an external style sheet, if you want to change the look of an entire website by changing just one file<\/li>\n\n\n\n<li>Each HTML page must include a reference to the external style sheet file inside the &lt;link&gt; element, inside the head section.<\/li>\n<\/ul>\n\n\n\n<p><strong>Example<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n   &lt;head&gt;\n       &lt;link rel=\"stylesheet\" href=\"style.css\"&gt;\n   &lt;\/head&gt; \n   &lt;body&gt;\n\t&lt;h1&gt;This is HJDOSHI Jamnagar&lt;\/h1&gt;\n        &lt;p&gt;We are BCA sem 1 students&lt;\/p&gt;\n    &lt;\/body&gt;\n&lt;\/html&gt;\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li>An external style sheet can be written in any text editor, and must be saved with a .css extension.<\/li>\n\n\n\n<li>The external .css file should not contain any HTML tags.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\">Here is how the \u201c<strong><em>style.css<\/em><\/strong>\u201d file looks:<\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>body {\n  background-color: lightblue;\n}\nh1 {\n  color: navy;\n  margin-left: 20px;\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"css-selectors\"><span class=\"ez-toc-section\" id=\"CSS_Selectors\"><\/span><strong>CSS Selectors<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li>CSS selectors are used to select the HTML elements you want to style. <\/li>\n\n\n\n<li>There are mainly three types of selectors:  Simple Element selector, Id selectors &amp; Class selectors<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_CSS_element_Selector\"><\/span><strong>The CSS element Selector<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li>The element selector selects HTML elements based on the element name.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n      &lt;head&gt;\n      &lt;style&gt;\n      h1{\n \t \ttext-align:center;\n                color:blue;\n      }\n      &lt;\/style&gt;\n      &lt;\/head&gt;\n      &lt;body&gt;\n                &lt;h1&gt;This is heading&lt;\/h1&gt;\n\t\t&lt;h1&gt;I am also affected by heading style&lt;h1&gt;\n     &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_CSS_id_Selector\"><\/span><strong>The CSS id Selector<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li>The id selector uses the id attribute of an HTML element to select a specific element.<\/li>\n\n\n\n<li>The id of an element is unique within a page, so the id selector is used to select one unique element.<\/li>\n\n\n\n<li>To select an element with a specific id, write a hash (#) character, followed by the id of the element.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n      &lt;head&gt;\n      &lt;style&gt;\n      #p1 {\n \t \ttext-align: center;\n                color: purple;\n      }\n      &lt;\/style&gt;\n      &lt;\/head&gt;\n      &lt;body&gt;\n\t\t&lt;p id=\"p1\"&gt;Hello BCA semester 1 students!!!&lt;\/p&gt;\n                &lt;p&gt;This paragraph is not affected by the style.&lt;\/p&gt;\n     &lt;\/body&gt;\n&lt;\/html&gt;\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_CSS_class_Selector\"><\/span><strong>The CSS class Selector<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li>The class selector selects HTML elements with a specific class attribute.<\/li>\n\n\n\n<li>To select elements with a specific class, write a period (.) character, followed by the class name.<\/li>\n\n\n\n<li>A class name cannot start with a number.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example:<\/strong> In this example all HTML elements with class=\u201dcenter\u201d will be purple and center-aligned<\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n      &lt;head&gt;\n      &lt;style&gt;\n      .center {\n                 text-align: center;\n                 color: purple;\n      }\n      &lt;\/style&gt;\n      &lt;\/head&gt;\n      &lt;body&gt;\n\t&lt;h1 class=\"center\"&gt;This is purple and center-aligned heading 1&lt;\/h1&gt;\n        &lt;p class=\"center\"&gt;This is purple and center-aligned paragraph.&lt;\/p&gt; \n      &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong>: You can also specify that only specific HTML elements should be affected by a class<\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n      &lt;head&gt;\n      &lt;style&gt;\n\t      p.center {\n\t\t        text-align: center;\n   \t\t        color: purple;\n\t\t\t}\n     &lt;\/style&gt;\n     &lt;\/head&gt;\n     &lt;body&gt;\n\t &lt;h1 class=\"center\"&gt;This heading1 will not be affected&lt;\/h1&gt;\n         &lt;p class=\"center\"&gt;This paragraph will be purple and center-aligned.&lt;\/p&gt; \n     &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong>: HTML elements can also refer to more than one class.<\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n      &lt;head&gt;\n      &lt;style&gt;\n\t     p.c {\n\t\t       text-align: center;\n\t\t       color: red;\n\t     }\n\t     p.l {  \n                      font-size: 20px; \n             }\n      &lt;\/style&gt;\n      &lt;\/head&gt;\n      &lt;body&gt;\n  \t   &lt;h1 class=\"c\"&gt;This heading will not be affected&lt;\/h1&gt;\n\t   &lt;p class=\"c\"&gt;This paragraph will be red and center-aligned.&lt;\/p&gt;\n\t   &lt;p class=\"l\"&gt;This paragraph has 20px font size&lt;\/p&gt;\n\t   &lt;p class=\"c l\"&gt;This paragraph will be red, center-aligned,     and in a large font-size.&lt;\/p&gt; \n      &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"css-font-property\"><span class=\"ez-toc-section\" id=\"CSS_Font_Property\"><\/span><strong>CSS Font Property<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li>CSS Font property is used to control the look of texts. By the use of CSS font property you can change the text size, color, style and more. The font property is a shorthand property for:<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list has-medium-font-size\">\n<li>font-style<\/li>\n\n\n\n<li>font-variant<\/li>\n\n\n\n<li>font-weight<\/li>\n\n\n\n<li>font-size\/line-height<\/li>\n\n\n\n<li>font-family<\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Font-style property:<\/strong> The font-style property specifies the font style for a text. Values are normal, italic or oblique<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n     &lt;head&gt;\n     &lt;style&gt;\n            p.a {  font-style: normal; }\n            p.b {   font-style: italic; }\n            p.c {   font-style: oblique; }\n     &lt;\/style&gt;\n     &lt;\/head&gt;\n     &lt;body&gt;\n            &lt;h1&gt;The font-style Property&lt;\/h1&gt;\n\t    &lt;p class=\"a\"&gt;This is a paragraph, normal.&lt;\/p&gt;\n            &lt;p class=\"b\"&gt;This is a paragraph, italic.&lt;\/p&gt;\n            &lt;p class=\"c\"&gt;This is a paragraph, oblique.&lt;\/p&gt;\n     &lt;\/body&gt;\n&lt;\/html&gt;\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Font-variant property:<\/strong><\/li>\n\n\n\n<li>CSS font variant property specifies how to set font variant of an element. It may be normal and small-caps.<\/li>\n\n\n\n<li>In a small-caps font, all lowercase letters are converted to uppercase letters. However, the converted uppercase letters appears in a smaller font size than the original uppercase letters in the text.<\/li>\n\n\n\n<li>The font-variant property specifies whether or not a text should be displayed in a small-caps font.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Syntax:<\/strong>\u00a0 font-variant: small-caps|normal<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Font-weight property: <\/strong><\/li>\n\n\n\n<li>The font-weight property sets how thick or thin characters in text should be displayed. <\/li>\n\n\n\n<li>It defines the weight of the font and specify that how bold a font is. <\/li>\n\n\n\n<li>The possible values of font weight may be normal, bold, bolder, lighter or number (100, 200\u2026.. upto 900).<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"has-medium-font-size\"><strong>Syntax:<\/strong>\u00a0 font-weight: bold |bolder | lighter | 100 |..| 900<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Font-size property: <\/strong>The font-size property sets the size of a font.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Syntax:<\/strong> font-size : xx-small | x-small | small | medium | large | x-large | xx-large | px | %<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Font-family property:<\/strong><\/li>\n\n\n\n<li>The font-family property specifies the font for an element. <\/li>\n\n\n\n<li>The font-family property can hold several font names as a \u201cfallback\u201d system. <\/li>\n\n\n\n<li>If the browser does not support the first font, it tries the next font.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"has-medium-font-size\"><strong>Syntax:<\/strong> font-family : \u201carial\u201d, \u201dbook antique\u201d<\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"css-text-property\"><span class=\"ez-toc-section\" id=\"CSS_Text_Property\"><\/span><strong>CSS Text Property<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Color<\/strong> <strong>property<\/strong>:<\/li>\n\n\n\n<li>It is used to change the color of the text. Values are given by color name, hexadecimal code or an RGB value.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Syntax<\/strong>: Color: red | #ff00ff | rgb(255,0,0)<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Text Alignment Property<\/strong>:<\/li>\n\n\n\n<li>It is used to set the horizontal alignment of a text. <\/li>\n\n\n\n<li>A text can be left or right aligned, centered, or justified. <\/li>\n\n\n\n<li>The following example shows center aligned, and left and right aligned text (left alignment is default if text direction is left-to-right, and right alignment is default if text direction is right-to-left)<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n      &lt;head&gt;\n      &lt;style&gt;\n             p.c{ text-align: center; }\n             p.l{ text-align: left;   }\n             p.r{ text-align: right;  }\n     &lt;\/style&gt;\n     &lt;\/head&gt;\n     &lt;body&gt;\n\t     &lt;p class=\"l\"&gt;H J Doshi Jamnagar&lt;\/p&gt;\n             &lt;p class=\"r\"&gt;H J Doshi Jamnagar&lt;\/p&gt;\n             &lt;p class=\"c\"&gt;H J Doshi Jamnagar&lt;\/p&gt;\n\t     &lt;p&gt;The three paragraphs above are aligned left, right &amp; center.&lt;\/p&gt;\n     &lt;\/body&gt;\n&lt;\/html&gt;\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li>When the text-align property is set to <strong>justify<\/strong>, each line is stretched so that every line has equal width, and the left and right margins are straight.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Text Direction Property<\/strong><\/li>\n\n\n\n<li>The direction property can be used to change the text direction of an element.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n      &lt;head&gt;\n      &lt;style&gt;\t\n              p.d{\t\n                  direction: rtl; \n              }\n      &lt;\/style&gt;\n      &lt;\/head&gt;\n      &lt;body&gt;\n         &lt;p&gt;This is the default text direction means left to right.&lt;\/p&gt;\n         &lt;p class=\"d\"&gt;This is right-to-left text direction.&lt;\/p&gt;\n      &lt;\/body&gt;\n&lt;\/html&gt;\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Vertical Alignment Property<\/strong><\/li>\n\n\n\n<li>The vertical-align property sets the vertical alignment of an element.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n      &lt;head&gt;\n      &lt;style&gt;\n             img.a {   vertical-align: baseline;   }\n             img.b {   vertical-align: text-top;   }\n             img.c {   vertical-align: text-bottom;}\n\t     img.d {   vertical-align: sub;        }\n\t     img.e {   vertical-align: super;      }\n     &lt;\/style&gt;\n     &lt;\/head&gt;\n     &lt;body&gt;\n           &lt;h2&gt;vertical-align: baseline - default:&lt;\/h2&gt;\n           &lt;p&gt;An &lt;img class=\"a\" src=\"a.jpg\" width=\"9\" height=\"9\"&gt; Image default    alignment.&lt;\/p&gt; \n           &lt;h2&gt;vertical-align: text-top:&lt;\/h2&gt;\n           &lt;p&gt;An &lt;img class=\"b\" src=\"a.jpg\" width=\"9\" height=\"9\"&gt; Image text-top alignment.&lt;\/p&gt; \n\t   &lt;h2&gt;vertical-align: text-bottom:&lt;\/h2&gt;\n           &lt;p&gt;An &lt;img class=\"c\" src=\"a.jpg\" width=\"9\" height=\"9\"&gt; Image Text-bottom alignment&lt;\/p&gt;\n           &lt;h2&gt;vertical-align: sub:&lt;\/h2&gt;\n           &lt;p&gt;An &lt;img class=\"d\" src=\"a.jpg\" width=\"9\" height=\"9\"&gt; image sub alignment.&lt;\/p&gt; \n\t   &lt;h2&gt;vertical-align: sup:&lt;\/h2&gt;\n           &lt;p&gt;An &lt;img class=\"e\" src=\"a.jpg\" width=\"9\" height=\"9\"&gt; image super alignment.&lt;\/p&gt;\n     &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Text Decoration Property <\/strong><\/li>\n\n\n\n<li>The text-decoration property is used to set or remove decorations from text. The value text-decoration: none; is often used to remove underlines from links.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n      &lt;head&gt;\n      &lt;style&gt;\n            a {  text-decoration: none;}\n      &lt;\/style&gt;\n      &lt;\/head&gt;\n      &lt;body&gt;\n\t\t&lt;h1&gt;Using text-decoration: none&lt;\/h1&gt;\n\t\t&lt;p&gt;A link with no underline:                                                        &lt;a href=\"https:\/\/swatilathia.wordpress.com\/\"&gt;swatilathia.wordpress.com&lt;\/a&gt;&lt;\/p&gt;\n      &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Other Text decoration properties<\/strong><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n      &lt;head&gt;\n      &lt;style&gt;\n             h2 {  text-decoration: overline;    }\n             h3 {  text-decoration: line-through;}\n             h4 {  text-decoration: underline;   }\n      &lt;\/style&gt;\n      &lt;\/head&gt;\n      &lt;body&gt;\n            &lt;h1&gt;The followings are different types of text decorations&lt;\/h1&gt;\n            &lt;h2&gt;Overline text decoration&lt;\/h2&gt;\n            &lt;h3&gt;Line-through text decoration&lt;\/h3&gt;\n            &lt;h4&gt;Underline text decoration&lt;\/h4&gt;\n      &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Text Transformation Property<\/strong><\/li>\n\n\n\n<li>The text-transform property is used to specify uppercase and lowercase letters in a text. It can be used to turn everything into uppercase or lowercase letters, or capitalize the first letter of each word.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n      &lt;head&gt;\n      &lt;style&gt;\n             p.uppercase {  text-transform: uppercase;}\n             p.lowercase {   text-transform: lowercase;}\n             p.capitalize{   text-transform: capitalize;}\n      &lt;\/style&gt;\n      &lt;\/head&gt;\n      &lt;body&gt;\n            &lt;p class=\"uppercase\"&gt;This text is transformed to uppercase.&lt;\/p&gt;\n            &lt;p class=\"lowercase\"&gt;THIS TEXT IS TRANSFORMED TO LOWERCASE.&lt;\/p&gt;\n            &lt;p class=\"capitalize\"&gt;This text is capitalized.&lt;\/p&gt;\n      &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Text Indentation<\/strong><\/li>\n\n\n\n<li>The text-indent property is used to specify the indentation of the first line of a text.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n      &lt;head&gt;\n      &lt;style&gt;\n             p{   \n                text-indent: 50px;\n                font-size:30px; \n              }\n      &lt;\/style&gt;\n      &lt;\/head&gt;\n      &lt;body&gt;\n            &lt;p&gt;Hi.. This is Swati Lathia. I work as a professor in Bhavan's H J     Doshi Information Technology Institute, Jamnagar. Currently I teach HTML, PHP &amp; SEO in BCA students.I like to explore the world and love to do every adventurious activities.&lt;\/p&gt;\n      &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Letter Spacing<\/strong><\/li>\n\n\n\n<li>The letter-spacing property is used to specify the space between the characters in a text. <\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"has-medium-font-size\"><strong>Word Spacing<\/strong><\/li>\n\n\n\n<li>The word-spacing property is used to specify the space between the words in a text. <\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n      &lt;head&gt;\n      &lt;style&gt;\n             p{    \n\t\tword-spacing:10px;                \n\t\tfont-size:30px;               \n\t\t}\n\t     h1\n   \t     {\n\t\tletter-spacing:10px;\n             }\n      &lt;\/style&gt;\n      &lt;\/head&gt;\n      &lt;body&gt;\n            &lt;p&gt;This is Word Spacing&lt;\/p&gt;\n\t    &lt;h1&gt;This is letter spacing&lt;\/h1&gt;\n      &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"css-background-property\"><span class=\"ez-toc-section\" id=\"CSS_Background_Property\"><\/span>CSS Background Property<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li>Background property has different types of properties to set colors, images, position, size &amp; many more as follows<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>background-color property<\/strong><\/li>\n\n\n\n<li>It sets the background color of an element.<\/li>\n\n\n\n<li>The background of an element is the total size of the element, including padding and border (but not the margin).<\/li>\n\n\n\n<li>Use a background color and a text color that makes the text easy to read.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Syntax: <\/strong>Background-color: colorname | hexcode | rgb() | transparent<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Opacity \/ Transparency<\/strong> <strong>Property<\/strong><\/li>\n\n\n\n<li>It specifies the opacity\/transparency of an element. <\/li>\n\n\n\n<li>Value ranges from 0.0 \u2013 1.0. <\/li>\n\n\n\n<li>The lower value means the more transparent &amp; the higher value means the less transparent or opaque.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example <\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n\t&lt;head&gt;\n\t\t&lt;style&gt;\n\t\t\t#p1{\n\t\t\t\tbackground-color:cyan;\n\t\t\t}\n\t\t\t#p2{\n\t\t\t\tbackground-color:cyan;\n\t\t\t\topacity:0.1;\n\t\t\t}\n\t\t\t#p3{\n\t\t\t\tbackground-color:cyan;\n\t\t\t\topacity:0.4;\n\t\t\t}\n\t\t\t#p4{\n\t\t\t\tbackground-color:cyan;\n\t\t\t\topacity:0.6;\n\t\t\t}\n\t\t\t#p5{\n\t\t\t\tbackground-color:cyan;\n\t\t\t\topacity:0.7;\n\t\t\t}\n\t\t&lt;\/style&gt;\n\t&lt;\/head&gt;\n\t&lt;body&gt;\n\t\t&lt;p id=p1&gt;Hello World&lt;\/p&gt;&lt;br&gt;&lt;br&gt;\n\t\t&lt;p id=p2&gt;Hello World&lt;\/p&gt;&lt;br&gt;&lt;br&gt;\n\t\t&lt;p id=p3&gt;Hello World&lt;\/p&gt;&lt;br&gt;&lt;br&gt;\n\t\t&lt;p id=p4&gt;Hello World&lt;\/p&gt;&lt;br&gt;&lt;br&gt;\n\t\t&lt;p id=p5&gt;Hello World&lt;\/p&gt;&lt;br&gt;&lt;br&gt;\n\t&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<p class=\"has-medium-font-size\">You can also set the transparency using RGB value. Let us take an example<\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n\t&lt;head&gt;\n\t\t&lt;style&gt;\n\t\t\t#p1{\n\t\t\t\tbackground-color:rgb(255,0,0,0.1);\n\t\t\t}\n\t\t&lt;\/style&gt;\n\t&lt;\/head&gt;\n\t&lt;body&gt;\n\t\t&lt;p id=p1&gt;Hello World&lt;\/p&gt;&lt;br&gt;&lt;br&gt;\n\t&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>background-image Property<\/strong><\/li>\n\n\n\n<li>It sets one or more background images for an element.<\/li>\n\n\n\n<li>By default, a background-image is placed at the top-left corner of an element, and repeated both vertically and horizontally.<\/li>\n\n\n\n<li>The background of an element is the total size of the element, including padding and border (but not the margin).<\/li>\n\n\n\n<li>Always set a background-color to be used if the image is unavailable.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Syntax: <\/strong>background-image: url(\u201cimagename.extension\u201d) | None;<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>body {\n \tbackground-image: url(\"flower.png\");\n        background-color: cyan;\n}\n<\/code><\/pre>\n\n\n\n<p class=\"has-medium-font-size\">You can also set two background images.<\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>body {\n  background-image: url(\"img1.jpg\"), url(\"img2.jpg\");\n  background-color: #f1f1f1;\n}\n<\/code><\/pre>\n\n\n\n<p class=\"has-medium-font-size\">We can set two background images for the &lt;body&gt; element in which the first image appear only once (with no-repeat), and let the second image be repeated:<\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>body {\n  background-image: url(\"img1.gif\"), url(\"img2.gif\");\n  background-repeat: no-repeat, repeat;\n  background-color: rgb(200,100,0);\n}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li class=\"has-medium-font-size\"><strong>background-position Property:<\/strong><\/li>\n\n\n\n<li>It sets the starting position of a background image.<\/li>\n\n\n\n<li>By default, a background-image is placed at the top-left corner of an element, and repeated both vertically and horizontally.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Syntax: <\/strong>background-position: left top | left center | left bottom | center top | center center | center bottom | right top | right center | right bottom | x% y% | px px<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>body {\n    background-image:url('img1.gif');\n    background-repeat:no-repeat;\n    background-position:left top;\n}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>background-repeat Property:<\/strong><\/li>\n\n\n\n<li>It sets if\/how a background image will be repeated.<\/li>\n\n\n\n<li>By default, a background-image is repeated both vertically and horizontally.<\/li>\n\n\n\n<li>The background image is placed according to the background-position property.<\/li>\n\n\n\n<li>If no background-position is specified, the image is always placed at the element\u2019s top left corner.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Syntax: <\/strong>Background-repeat: no-repeat | repeat | repeat-x | repeat-y | space | round<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>background-attachment Property:<\/strong><\/li>\n\n\n\n<li>It sets whether a background image scrolls with the rest of the page, or is fixed.<\/li>\n\n\n\n<li><strong>Scroll<\/strong>:\u00a0 The background image will scroll with the page. This is default<\/li>\n\n\n\n<li><strong>Fixed:<\/strong>\u00a0 The background image will not scroll with the page<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Syntax:<\/strong> background-attachment: scroll|fixed;<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>body {\n  background-image: url(\"img2.jpg\");\n  background-repeat: no-repeat;\n  background-attachment: scroll;\n}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>background \u2013 Shorthand Property<\/strong> : <\/li>\n\n\n\n<li>It specifies all the background properties in one single property. Order must be :<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>background-color<\/strong><\/li>\n\n\n\n<li><strong>background-image<\/strong><\/li>\n\n\n\n<li><strong>background-repeat<\/strong><\/li>\n\n\n\n<li><strong>background-attachment<\/strong><\/li>\n\n\n\n<li><strong>background-position<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n\t&lt;head&gt;\n\t\t&lt;style&gt;\n\t\t\tbody{\n\t\t\t\tbackground:#ffffff url(\"aol.png\") no-repeat right top;\n\t\t\t}\n\t\t&lt;\/style&gt;\n\t&lt;\/head&gt;\n\t&lt;body&gt;\n\t\t&lt;p&gt;Hello World&lt;\/p&gt;\n\t&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"CSS_Border_Property\"><\/span><strong>CSS Border Property<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li>The\u00a0border\u00a0property in CSS is used to style the border of a given element. This property is a combination of three other properties\u00a0border-width,\u00a0border-style, and\u00a0border-color. It is used as shorthand property for all these properties.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Border-width<\/strong> can have following values : thin, medium, thick, 10px (in pixels). <\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Border-style<\/strong> can have following values : none, solid, dotted, dashed, inset, outset, ridge, groove, double, hidden. <\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>border-color<\/strong> can have following values: color name, transparent, rgb(red value,green value,blue value)<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong> : We have used all three property individually here<\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n\t&lt;head&gt;\n\t\t&lt;style&gt;\n\t\t\t#e1{\n\t\t\t\tborder-color:purple;\n\t\t\t\tborder-style:double;\n\t\t\t\tborder-width:20px;\n\t\t\t}\n\t\t&lt;\/style&gt;\n\t&lt;\/head&gt;\n\t&lt;body&gt;\n\t\t&lt;p id='e1'&gt;Border Property Example&lt;\/p&gt;\n\t&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<p class=\"has-medium-font-size\">We have used all three property individually here. You can use all these three property in one property: border. Look at following example.<\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n\t&lt;head&gt;\n\t\t&lt;style&gt;\n\t\t\t#e2{\n                                \/* style width color *\/\n\t\t\t\tborder:double 10px red;\n\t\t\t}\n\t\t&lt;\/style&gt;\n\t&lt;\/head&gt;\n\t&lt;body&gt;\n\t\t&lt;p id='e2'&gt;Border short hand property Example&lt;\/p&gt;\n\t&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>border-bottom\u00a0Property :<\/strong> It is a shorthand property for bottom border. It sets the style of the bottom border for a given element.<\/li>\n\n\n\n<li><strong>border-top\u00a0Property : <\/strong>It is a shorthand property for top border. It sets the style of the top border for a given element.<\/li>\n\n\n\n<li><strong>border-left\u00a0Property : <\/strong>It is a shorthand property for left border. It sets the style of the left border for a given element.<\/li>\n\n\n\n<li><strong>border-right\u00a0Property : <\/strong>It is a shorthand property for right border. It sets the style of the right border for a given element.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n\t&lt;head&gt;\n\t\t&lt;style&gt;\n\t\t\t#e3{\n\t\t\t\tborder-bottom:solid 5px red;\n\t\t\t\tborder-top:dashed 5px red;\n\t\t\t\tborder-left:double 5px red;\n\t\t\t\tborder-right:dotted 5px red;\n\t\t\t}\n\t\t&lt;\/style&gt;\n\t&lt;\/head&gt;\n\t&lt;body&gt;\n\t\t&lt;p id='e3'&gt;Border for each side short hand property Example&lt;\/p&gt;\n\t&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Border-bottom-color Property :<\/strong> It set a color for the bottom border.<\/li>\n\n\n\n<li><strong>Border-top-color Property :<\/strong> It set a color for the top border.<\/li>\n\n\n\n<li><strong>Border-left-color Property :<\/strong> It set a color for the left border.<\/li>\n\n\n\n<li><strong>Border-right-color Property :<\/strong> It set a color for the right border.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong> : Without border-width &amp; border-style , border-color does not work.<\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n\t&lt;head&gt;\n\t\t&lt;style&gt;\n\t\t\t#e4{\n\t\t\t\tborder-bottom-color:red;\n\t\t\t\tborder-top-color:green;\n\t\t\t\tborder-left-color:orange;\n\t\t\t\tborder-right-color:blue;\n\t\t\t\tborder-style:solid;\n\t\t\t\tborder-width:5px;\n\t\t\t}\n\t\t&lt;\/style&gt;\n\t&lt;\/head&gt;\n\t&lt;body&gt;\n\t\t&lt;p id='e4'&gt;Border Color for each side&lt;\/p&gt;\n\t&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Border-bottom-width Property:<\/strong> It sets a width for the bottom border.<\/li>\n\n\n\n<li><strong>Border-top-width <strong>Property<\/strong>:<\/strong> It sets a width for the top border.<\/li>\n\n\n\n<li><strong>Border-left-width <strong>Property<\/strong>:<\/strong> It sets a width for the left border.<\/li>\n\n\n\n<li><strong>Border-right-width <strong>Property<\/strong>:<\/strong> It sets a width for the right border.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n\t&lt;head&gt;\n\t\t&lt;style&gt;\n\t\t\t#e5{\n\t\t\t\tborder-bottom-width:15px;\n\t\t\t\tborder-top-width:10px;\n\t\t\t\tborder-left-width:20px;\n\t\t\t\tborder-right-width:5px;\n\t\t\t\tborder-style:solid;\n\t\t\t\tborder-color:purple;\n\t\t\t}\n\t\t&lt;\/style&gt;\n\t&lt;\/head&gt;\n\t&lt;body&gt;\n\t\t&lt;p id='e5'&gt;Border width for each side&lt;\/p&gt;\n\t&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>border-bottom-style <strong>Property<\/strong>:<\/strong> It sets a style for the bottom border.<\/li>\n\n\n\n<li><strong>border-top-style <strong>Property<\/strong>:<\/strong> It sets a style for the top border.<\/li>\n\n\n\n<li><strong>border-left-style <strong>Property<\/strong>:<\/strong> It sets a style for the left border.<\/li>\n\n\n\n<li><strong>border-right-style <strong>Property<\/strong>:<\/strong> It sets a style for the right border.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n\t&lt;head&gt;\n\t\t&lt;style&gt;\n\t\t\t#e6{\n\t\t\t\tborder-bottom-style:double;\n\t\t\t\tborder-top-style:dashed;\n\t\t\t\tborder-left-style:dotted;\n\t\t\t\tborder-right-style:solid;\n\t\t\t\tborder-width:10px;\n\t\t\t\tborder-color:darkblue;\n\t\t\t}\n\t\t&lt;\/style&gt;\n\t&lt;\/head&gt;\n\t&lt;body&gt;\n\t\t&lt;p id='e6'&gt;Border Style for each side&lt;\/p&gt;\n\t&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>border-spacing\u00a0<strong>Property<\/strong>:<\/strong> It sets the distance between the borders of adjacent cells of a table.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n\t&lt;head&gt;\n\t\t&lt;style&gt;\n\t\t\ttable,td,th {\n\t\t\t\t\t\tborder: 1px solid black;\n\t\t\t}\n\t\t\t#t1{\n\t\t\t\t\t\tborder-spacing: 15px;\n\t\t\t}\n\t\t\t#t2 {\n\t\t\t\t\t\tborder-spacing: 5px 30px;\n\t\t\t}\n\t\t&lt;\/style&gt;\n\t&lt;\/head&gt;\n\t&lt;body&gt;\n\t\t&lt;table id=\"t1\"&gt;\n\t\t\t&lt;tr&gt;\n\t\t\t\t&lt;th&gt;Firstname&lt;\/th&gt;\n\t\t\t\t&lt;th&gt;Lastname&lt;\/th&gt;\n\t\t\t&lt;\/tr&gt;\n\t\t\t&lt;tr&gt;\n\t\t\t\t&lt;td&gt;Lata&lt;\/td&gt;\n\t\t\t\t&lt;td&gt;Mageshkar&lt;\/td&gt;\n\t\t\t&lt;\/tr&gt;\n\t\t\t&lt;tr&gt;\n\t\t\t\t&lt;td&gt;Asha&lt;\/td&gt;\n\t\t\t\t&lt;td&gt;Bholse&lt;\/td&gt;\n\t\t\t&lt;\/tr&gt;\n\t\t&lt;\/table&gt;\n\t\t&lt;br&gt;\n\t\t&lt;br&gt;\n\t\t&lt;table id=\"t2\"&gt;\n\t\t\t&lt;tr&gt;\n\t\t\t\t&lt;th&gt;Firstname&lt;\/th&gt;\n\t\t\t\t&lt;th&gt;Lastname&lt;\/th&gt;\n\t\t\t&lt;\/tr&gt;\n\t\t\t&lt;tr&gt;\n\t\t\t\t&lt;td&gt;Lata&lt;\/td&gt;\n\t\t\t\t&lt;td&gt;Mageshkar&lt;\/td&gt;\n\t\t\t&lt;\/tr&gt;\n\t\t\t&lt;tr&gt;\n\t\t\t\t&lt;td&gt;Asha&lt;\/td&gt;\n\t\t\t\t&lt;td&gt;Bholse&lt;\/td&gt;\n\t\t\t&lt;\/tr&gt;\n\t\t&lt;\/table&gt;\n\t&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>border-collapse Property<\/strong> : It sets whether table borders should collapse into a single border or be separated as in standard HTML.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong> : We have used border-spacing to check the spacing between cells when border is separate.<\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n\t&lt;head&gt;\n\t\t&lt;style&gt;\n\t\t\ttable,td,th {\n\t\t\t\t\t\tborder: 1px solid black;\n\t\t\t}\n\t\t\t#t3{\n\t\t\t\t\t\tborder-collapse:separate;\n\t\t\t\t\t\tborder-spacing:10px 40px;\n\t\t\t}\n\t\t\t#t4 {\n\t\t\t\t\t\tborder-collapse:collapse;\n\t\t\t}\n\t\t&lt;\/style&gt;\n\t&lt;\/head&gt;\n\t&lt;body&gt;\n\t\t&lt;table id=\"t3\"&gt;\n\t\t\t&lt;tr&gt;\n\t\t\t\t&lt;th&gt;Firstname&lt;\/th&gt;\n\t\t\t\t&lt;th&gt;Lastname&lt;\/th&gt;\n\t\t\t&lt;\/tr&gt;\n\t\t\t&lt;tr&gt;\n\t\t\t\t&lt;td&gt;Lata&lt;\/td&gt;\n\t\t\t\t&lt;td&gt;Mageshkar&lt;\/td&gt;\n\t\t\t&lt;\/tr&gt;\n\t\t\t&lt;tr&gt;\n\t\t\t\t&lt;td&gt;Asha&lt;\/td&gt;\n\t\t\t\t&lt;td&gt;Bholse&lt;\/td&gt;\n\t\t\t&lt;\/tr&gt;\n\t\t&lt;\/table&gt;\n\t\t&lt;br&gt;\n\t\t&lt;br&gt;\n\t\t&lt;table id=\"t4\"&gt;\n\t\t\t&lt;tr&gt;\n\t\t\t\t&lt;th&gt;Firstname&lt;\/th&gt;\n\t\t\t\t&lt;th&gt;Lastname&lt;\/th&gt;\n\t\t\t&lt;\/tr&gt;\n\t\t\t&lt;tr&gt;\n\t\t\t\t&lt;td&gt;Lata&lt;\/td&gt;\n\t\t\t\t&lt;td&gt;Mageshkar&lt;\/td&gt;\n\t\t\t&lt;\/tr&gt;\n\t\t\t&lt;tr&gt;\n\t\t\t\t&lt;td&gt;Asha&lt;\/td&gt;\n\t\t\t\t&lt;td&gt;Bholse&lt;\/td&gt;\n\t\t\t&lt;\/tr&gt;\n\t\t&lt;\/table&gt;\n\t&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"css-list-property\"><span class=\"ez-toc-section\" id=\"CSS_List_Property\"><\/span>CSS List Property<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"has-medium-font-size\">There are two main list types in HTML:<\/li>\n<\/ul>\n\n\n\n<ol style=\"list-style-type:1\" class=\"wp-block-list has-medium-font-size\">\n<li>&lt;UL&gt; \u2013 unordered lists \u2013 bullets are used to mark the list items<\/li>\n\n\n\n<li>&lt;OL&gt; \u2013 ordered lists- numbers or letters are used to mark the list items<\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li>CSS list properties allow to do followings:<\/li>\n<\/ul>\n\n\n\n<ol style=\"list-style-type:1\" class=\"wp-block-list has-medium-font-size\">\n<li>We can set different list item markers for ordered lists<\/li>\n\n\n\n<li>We can set different list item markers for unordered lists<\/li>\n\n\n\n<li>We can set an image as the list item marker<\/li>\n\n\n\n<li>We can add background colors to lists and list items<\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>list-style-type Property: <\/strong>It specifies the type of list item marker.<\/li>\n\n\n\n<li>Values are disc, circle, square, decimal, decimal-leading-zero, lower-alpha, lower-greek, lower-latin, lower-roman, upper-alpha, upper-greek, upper-latin, upper-roman, none and so on.<\/li>\n\n\n\n<li><strong>list-style-image Property: <\/strong>It specifies an image as the list item marker.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n       &lt;head&gt;\n       &lt;style&gt;\n       ul.a {  list-style-type: disc;         }\n       ul.b {  list-style-type: square;       }\n       ol.c {  list-style-type: upper-roman;  }\n       ol.d {  list-style-type: upper-alpha;  }\n          .i{  list-style-image: url('a.jpg'); }\n         .fs{  font-size:30px;                }\n      &lt;\/style&gt;\n      &lt;\/head&gt;\n      &lt;body&gt;\n\t\t&lt;p class=\"fs\"&gt;Unordered List&lt;\/p&gt;\n                &lt;ul class=\"a fs\"&gt;\n                &lt;li&gt;Babu Rao &lt;\/li&gt;\n                    &lt;li&gt;Raju&lt;\/li&gt;\n                    &lt;li&gt;Shyam&lt;\/li&gt;\n                &lt;\/ul&gt;\n\t\t&lt;ul class=\"b fs\"&gt;\n                    &lt;li&gt;Kaliya&lt;\/li&gt;\n                    &lt;li&gt;Gabbar Singh&lt;\/li&gt;\n                    &lt;li&gt;Jay&lt;\/li&gt;\n                    &lt;li&gt;Veeru&lt;\/li&gt;\n                &lt;\/ul&gt;\n\t\t&lt;p class=\"fs\"&gt;Example of ordered lists:&lt;\/p&gt;\n                &lt;ol class=\"c fs\"&gt;\n                    &lt;li&gt;Gujrati&lt;\/li&gt;\n                    &lt;li&gt;Hindi&lt;\/li&gt;\n                    &lt;li&gt;Rajasthani&lt;\/li&gt;\n                &lt;\/ol&gt;\n\t\t&lt;ol class=\"d fs\"&gt;\n                    &lt;li&gt;HTML&lt;\/li&gt;\n                    &lt;li&gt;C language&lt;\/li&gt;\n                    &lt;li&gt;Computer Fundamentals&lt;\/li&gt;\n                &lt;\/ol&gt;\n\t\t&lt;ul class=\"i fs\"&gt;\n                    &lt;li&gt;BCA&lt;\/li&gt;\n                    &lt;li&gt;MCA&lt;\/li&gt;\n                    &lt;li&gt;PGDCA&lt;\/li&gt;\n                &lt;\/ul&gt;\n       &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>list-style-position Property:<\/strong> It specifies the position of the list-item markers (bullet points).<\/li>\n\n\n\n<li>Values are inside and outside.<\/li>\n\n\n\n<li><strong>list-style-position:<\/strong> outside; \u2013 the bullet points will be outside the list item. The start of each line of a list item will be aligned vertically.<\/li>\n\n\n\n<li><strong>list-style-position:<\/strong> inside; \u2013 that the bullet points will be inside the list item. As it is part of the list item, it will be part of the text and push the text at the start<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n      &lt;head&gt;\n      &lt;style&gt;\n             ul.a {  list-style-position: outside;}\n             ul.b {  list-style-position: inside; }\n      &lt;\/style&gt;\n      &lt;\/head&gt;\n      &lt;body&gt;\n\t    This is an outside List Example&lt;br&gt;\n            &lt;ul class=\"a\"&gt;\n                 &lt;li&gt;BCA : Bechalor of Computer Application, A three year course   with a number of subjects like C, C++, Data structure, PHP, HTML &amp; networking, Oracle, Computer Fundamentals, Computer Organization Architeture, JAVA, Asp.net, Search Engine Optimization, Android, Python, Data warehousing &amp; Sql server&lt;\/li&gt;\n                 &lt;li&gt;MCA&lt;\/li&gt;\n      &lt;\/ul&gt;\n\t   This is an Inside List Example&lt;br&gt;\n           &lt;ul class=\"b\"&gt;\n                 &lt;li&gt;BCA : Bechalor of Computer Application, A three year course with a number of subjects like C, C++, Data structure, PHP, HTML &amp; networking, Oracle, Computer Fundamentals, COmputer Organization Architeture, JAVA, Asp.net, Search Engine Optimization, Android, Python, Data warehousing &amp; Sql server&lt;\/li&gt;\n                &lt;li&gt;MCA&lt;\/li&gt;\n           &lt;\/ul&gt;\n\t&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>list-style:<\/strong> This property is a shorthand property. It is used to set all the list properties in one declaration. list-style-type, list-style-position, list-style-image are in one go.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n      &lt;head&gt;\n      &lt;style&gt;\n             ul {   list-style: square inside url(\"a.jpg\"); }\n      &lt;\/style&gt;\n      &lt;\/head&gt;\n      &lt;body&gt;  \n             &lt;ul&gt;\n                  &lt;li&gt;BCA : Bechalor of Computer Application, A three year course with a number of subjects like C, C++, Data structure, PHP, HTML &amp; networking, Oracle, Computer Fundamentals, Computer Organization Architecture, JAVA, Asp.net, Search Engine Optimization, Android, Python, Data warehousing &amp; SQL server&lt;\/li&gt;\n                 &lt;li&gt;MCA&lt;\/li&gt;\n             &lt;\/ul&gt;\t\n     &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"css-margin-properties\"><span class=\"ez-toc-section\" id=\"CSS_Margin_Properties\"><\/span><strong>CSS Margin Properties<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li>The CSS margin properties are used to create space around elements, outside of any defined borders.<\/li>\n\n\n\n<li>There are properties for setting the margin for each side of an element (top, right, bottom, and left).<\/li>\n\n\n\n<li>These properties are margin-top, margin-right, margin-bottom, margin-left.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li>All the margin properties can have the following values:  <\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li>auto \u2013 the browser calculates the margin<\/li>\n\n\n\n<li>length \u2013 specifies a margin in px, pt, cm, etc.<\/li>\n\n\n\n<li>% \u2013 specifies a margin in % of the width of the containing element<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;head&gt;\n&lt;style&gt;\np{\n  margin-top: 50px;\n  margin-bottom: 100px;\n  margin-right: 50px;\n  margin-left: 50px;\n  background-color:lightblue;\n}\n&lt;\/style&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n     &lt;p&gt;This paragraph has a top margin of 50px, a right margin of 50px, a bottom  margin of 100px, and a left margin of 50px.&lt;\/p&gt;\n&lt;\/body&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Margin Shorthand Property:<\/strong> In this property, all the margin properties are included in one go. <\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;html&gt;\n&lt;head&gt;\n&lt;style&gt;\np\n{\n  margin: 50px 50px 100px 100px;\n  background-color: lightblue;\n}\n&lt;\/style&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n&lt;p&gt;This paragraph element has a top margin of 50px, a right margin of 50px, a bottom margin of 100px, and a left margin of 100px.&lt;\/p&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Margin Property with three values: margin: 25px 50px 75px;<\/strong><\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u00a0Top margin 25px , Right margin 50px , bottom margin 75px &amp; Left margin 50 px<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Margin Property with two values: margin: 25px 50px;<\/strong><\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>top and bottom margins are 25px , right and left margins are 50px<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Margin Property with one value: margin: 25px;<\/strong><\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>All four margins are 25px<\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"css-comments\"><span class=\"ez-toc-section\" id=\"CSS_comments\"><\/span><strong>CSS comments<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li>Comments in CSS are not displayed in the browser, but they can help document your source code.<\/li>\n\n\n\n<li>Comments are used to explain the code, and may help when you edit the source code at a later date.<\/li>\n\n\n\n<li>Comments are ignored by browsers.<\/li>\n\n\n\n<li>A CSS comment is placed inside the &lt;style&gt; element, and starts with \/* and ends with *\/:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>\/* This is a single-line comment *\/\np {\n  color: red;\n}\n\n\/* This is\n multi-line \ncomment *\/\n\np {\n  color: red;\n}<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"css-pseudo-class\"><span class=\"ez-toc-section\" id=\"CSS_Pseudo_Class\"><\/span>CSS Pseudo Class<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li>CSS pseudo class is a keyword added to a selector that specifies a special state of the selected elements. For example, <strong>:hover<\/strong> can be used to change a paragraph\u2019s background color when user hovers over paragraph.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Syntax<\/strong> <\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>selector:pseudo-class {\n                 property:value;\n}<\/code><\/pre>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong> : In this example, i have put an hover pseudo class for element selector P.<\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;head&gt;\n&lt;style&gt;\n\tp:hover{\n\t\tpadding:40px;\n\t\tbackground-color:yellow;\n\t}\n&lt;\/style&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n\t&lt;p&gt;This paragraph changes its color when you point a mouse over it&lt;\/p&gt;\n&lt;\/body&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"anchor-pseudo-classes\"><span class=\"ez-toc-section\" id=\"Anchor_Pseudo_Classes\"><\/span><strong>Anchor Pseudo Classes<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li>Anchor tag &lt;a&gt; have following pseudo classes : link , visited, hover &amp; active. Link will show you the color of the link , if you have not yet visited (clicked) the link, It will show you the color red (as per below example). If you have clicked the link, it will show you a link in yellow color. If you hover a mouse pointer over a link, it will show you a link in green color. If you click a link, for a fraction of a second it will show a link in cyan color.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n&lt;style&gt;\n\na:link {\n  color:red;\/\/unvisited link color\n}\na:visited {\n  color: yellow;\/\/visited link color\n}\na:hover {\n  color: green;\/\/hover effect \n}\na:active {\n  color: cyan;\/\/active link color\n}\n&lt;\/style&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n\t&lt;a href=\"https:\/\/swatilathia.com\/\" target=\"_blank\"&gt;Click Me and Check the colors&lt;\/a&gt;&lt;\/b&gt;&lt;\/p&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"css-pseudo-elements\"><span class=\"ez-toc-section\" id=\"CSS_Pseudo-elements\"><\/span>CSS&nbsp;Pseudo-elements<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li>A CSS pseudo-element is used to style specified parts of an element. It is used to style the first letter, or first line of an element. It is also used to insert the content before, or after, the content of an element or to give style when you select some element.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Syntax<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>selector::pseudo-element {\n                         property: value;\n}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>The ::first-letter Pseudo-element : <\/strong> It is is used to add a special style to the first letter of a text.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example <\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n&lt;style&gt;\np::first-letter{\n  color:red;\n  font-size:30px;\n}\n&lt;\/style&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n&lt;p&gt;The ::first-letter pseudo-element shows a special effect to the first character of a text&lt;\/p&gt;\n&lt;p&gt;The ::first-letter pseudo-element shows a special effect to the first character of a text&lt;\/p&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li>You can apply other properties to this pseudo element : <strong>font properties , color properties\u00a0, background properties, margin properties, padding properties, border properties, text-decoration, text-transform<\/strong><\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Multiple Pseudo-elements<\/strong> : You can combine more than one pseudo elements. Look at the following example.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n&lt;style&gt;\np::first-letter {\n  color: blue;\n  font-size: 40px;\n}\np::first-line {\n  color: red;\n  font-variant: small-caps;\n}\n&lt;\/style&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n&lt;p&gt;Bhavan's Shri H J Doshi Jamnagar&lt;\/p&gt;\n&lt;p&gt;Bhavan's Shri H J Doshi Jamnagar&lt;\/p&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>::before Pseudo-element<\/strong> : It is used to insert some content before the content of an element.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n\t&lt;head&gt;\n\t\t&lt;style&gt;\n\t\t\t\/* ::before pseudo element *\/\n\t\t\tp::before\n\t\t\t{\n\t\t\t\tcontent:\" Hello Everyone!! \";\n\t\t\t}\n\t\t\t\n\t\t\t\/* ::after pseudo element *\/\n\t\t\th1::after\n\t\t\t{\n\t\t\t\tcontent:\" Welcome here! \";\n\t\t\t}\n\t\t&lt;\/style&gt;\n\t&lt;\/head&gt;\n\t&lt;body&gt;\n\t\t&lt;h1&gt;Bhavan's H J Doshi Jamnagar&lt;\/h1&gt;\n\t\t&lt;p&gt;This is Swati Lathia&lt;\/p&gt;\n\t\t&lt;p&gt;How are you all?&lt;\/p&gt;\n\t&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"has-medium-font-size\"><strong>::marker Pseudo-element<\/strong> : It is used to select the markers of list items.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n\t&lt;head&gt;\n\t\t&lt;style&gt;\n\t\t\t\/* you can select the marker of list  *\/\n\t\t\t::marker \n\t\t\t{ \n\t\t\t\tcolor:Purple;\n\t\t\t\tfont-size:30px;\n\t\t\t}\t\n\t\t&lt;\/style&gt;\n\t&lt;\/head&gt;\n\t&lt;body&gt;\n\t\t&lt;ol&gt;\n\t\t\t&lt;li&gt;HTML&lt;\/li&gt;\n\t\t\t&lt;li&gt;CSS&lt;\/li&gt;\n\t\t\t&lt;li&gt;Javascript&lt;\/li&gt;\n\t\t\t&lt;li&gt;Internet Introduction&lt;\/li&gt;\n\t\t&lt;\/ol&gt;\n\t\t&lt;ul&gt;\n\t\t\t&lt;li&gt;Language C&lt;\/li&gt;\n\t\t\t&lt;li&gt;OOP&lt;\/li&gt;\n\t\t\t&lt;li&gt;DS&lt;\/li&gt;\n\t\t\t&lt;li&gt;Java&lt;\/li&gt;\n\t\t&lt;\/ul&gt;\n\t&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>::selection Pseudo-element:<\/strong> When you select any element, it will give the style accordingly.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n&lt;style&gt;\n::selection \n{\n  color:blue;\n  background-color:cyan;\n}\n&lt;\/style&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n       &lt;h1&gt;H J DOSHI Jamnagar&lt;\/h1&gt;\n       &lt;p&gt;Select any text here&lt;\/p&gt;\n       &lt;div&gt;This is division tag&lt;\/div&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;\n<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"css-media-query\"><span class=\"ez-toc-section\" id=\"CSS_Media_Query\"><\/span>CSS Media Query<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li>In CSS (Cascading Style Sheets), a media query is a technique used to apply different styles to a webpage based on certain conditions, such as the size of the viewport or the type of device being used to view the page. <\/li>\n\n\n\n<li>Media queries allow you to create responsive designs that adapt and look good on various screen sizes and devices, including desktops, tablets, and smartphones.<\/li>\n\n\n\n<li>It is used to create Responsive Web Design (RWD). It uses the\u00a0<code>@media<\/code>\u00a0rule to include a block of CSS properties only if a certain condition is true.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Syntax<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>@media (condition) {\n  \/* Styles to apply when the condition is met *\/\n}<\/code><\/pre>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n&lt;style&gt;\nbody {\n  background-color:cyan;\n}\n@media(max-width: 500px) \n{\n  body \n  {\n        background-color:gray;\n\tcolor:white;\n\tfont-family:\"lucida handwriting\";\n  }\n}\n&lt;\/style&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n       &lt;p&gt;Resize the browser window.When the width of this document is 500 pixels or less, the   background-color is \"gray\",font color is \"white\" &amp; font face is \"lucida handwriting\", otherwise background color is \"cyan\".&lt;\/p&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"responsive-web-design-images\"><span class=\"ez-toc-section\" id=\"Responsive_Web_Design_%E2%80%93_Images\"><\/span>Responsive Web Design &#8211; Images <span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list has-medium-font-size\">\n<li><strong>Using The width Property<\/strong> : <\/li>\n\n\n\n<li>If the width property is set to a percentage and the height property is set to \u201cauto\u201d, the image will be responsive and scale up and down<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Example<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n&lt;style&gt;\nimg {\n  width: 100%;\n  height: auto;\n}\n&lt;\/style&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n      &lt;img src=\"img.jpg\" width=\"460\" height=\"345\"&gt;\n      &lt;p&gt;Now Resize the browser window to check how the image will scale.&lt;\/p&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n<\/body>","protected":false},"excerpt":{"rendered":"<p>What is CSS? CSS Syntax : A CSS file consists of a selector and a declaration block as follows Example: In this example all &lt;p&gt; elements will be center-aligned, with a blue text color Types of Style Sheets Internal CSS Example Inline CSS Example External CSS Example Here is how the \u201cstyle.css\u201d file looks: CSS [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"zakra_page_container_layout":"customizer","zakra_page_sidebar_layout":"customizer","zakra_remove_content_margin":false,"zakra_sidebar":"customizer","zakra_transparent_header":"customizer","zakra_logo":0,"zakra_main_header_style":"default","zakra_menu_item_color":"","zakra_menu_item_hover_color":"","zakra_menu_item_active_color":"","zakra_menu_active_style":"","zakra_page_header":true,"om_disable_all_campaigns":false,"footnotes":""},"class_list":["post-1296","page","type-page","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/swatilathia.com\/index.php?rest_route=\/wp\/v2\/pages\/1296","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/swatilathia.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/swatilathia.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/swatilathia.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/swatilathia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1296"}],"version-history":[{"count":4,"href":"https:\/\/swatilathia.com\/index.php?rest_route=\/wp\/v2\/pages\/1296\/revisions"}],"predecessor-version":[{"id":5607,"href":"https:\/\/swatilathia.com\/index.php?rest_route=\/wp\/v2\/pages\/1296\/revisions\/5607"}],"wp:attachment":[{"href":"https:\/\/swatilathia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1296"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}