Sass has two different syntax options to choose from :
๐SCSS - which has the same syntax as CSS but with the added features of SASS.
๐Sass (the original syntax), which uses indentation rather than curly braces and semicolons.
#DEVCommunity#100DaysOfCode#WebDev#CodeNewbie
/* element is in focus */
selected:focus { }
/*element that is the first child of its parent */
selector:first-child {}
/*element that is the last child of its parent */
selector:last-child {}
#DEVCommunity#100DaysOfCode#css#WebDev#CodeNewbie
pseudo classes : can be used to select an element only when it is in a particular state.
/*cursor hovers over an element*/
selector:hover { }
/*link has been visited*/
selector:visited { }
/*link hasn't been visited*/
selected:link { }
#100DaysOfCode#css#WebDev#CodeNewbie
Pseudo-class selector :
The specified element, but only when in the specified state. (For example, when a cursor hovers over a link.)
a:hover
selects <a>, but only when the mouse pointer is hovering over the link.
#CSS#webdev#100DaysOfCode#DEVCommunity
Attribute selector :
The element(s) on the page with the specified attribute.
img[src] selects <img src="myimage.png"> but not <img>
#CSS#webdev#100DaysOfCode#DEVCommunity
ID : Like classes, we can also use IDs to select HTML elements. The only difference between class and ID is that one ID can be assigned to only one HTML element.
<p id='text'>..</p>
#text {
color: green;
font-size: 16px;
}
#CSS#100DaysOfCode#DEVCommunity
Class : In HTML, we can assign different classes to our elements. Each element can have multiple classes, and each class can also be applied to multiple elements as well.
<div class='container text-center'>
..
</div>
#CSS#webdev#100DaysOfCode#CodeNewbie#DEVCommunity
External CSS : Include CSS is using an external stylesheet.
We create a stylesheet with a .css extension and include its link in the HTML document.
<head>
<link rel="stylesheet" href="style.css">
</head>
This recommended way.
#CSS#100DaysOfCode#CodeNewbie