CSS Attribute selector

CSS attribute selector selects the HTML elements that has a specific attribute or attribute with a specified value. This is the simplest form of an attribute selector that applies the style rules to an element if a given attribute exists. For example, we can style all the elements that have a title attribute by using the following … Read more

CSS Links

CSS Links can be styled with any CSS property (e.g. color, font-family, background, etc.). The web was founded on links. The idea that we can click/tap a link and navigate from one web page to another is how surfing the web become a household phrase. Links in HTML even look different from regular text without any CSS styling at all. … Read more

CSS Units

CSS units determines the size of a property you’re setting for an element or its content. For example, if you wanted to set the property margin of a paragraph, you would give it a specific value. This value includes the CSS unit.CSS has several options for which units to use when determining the size of various CSS … Read more

Categories CSS

CSS Pseudo-class

CSS pseudo-class  is a keyword added to a selector that specifies a special state of the selected element(s). For example, :hover can be used to change a button’s color when the user’s pointer hovers over it.Pseudo-classes let you apply a style to an element not only in relation to the content of the document tree, but also in relation … Read more

Categories CSS

CSS !important

CSS !important property in CSS is used to provide more weight (importance) than normal property. In CSS, the !important means that “this is important”, ignore all the subsequent rules, and apply !important rule and the !important keyword must be placed at the end of the line, immediately before the semicolon. In other words, it adds importance to … Read more

Categories CSS

CSS Selector

A CSS selector is the first part of a CSS Rule. It is a pattern of elements and other terms that tell the browser which HTML elements should be selected to have the CSS property values inside the rule applied to them. The element or elements which are selected by the selector are referred to … Read more

CSS Pseudo-elements

CSS Pseudo-element is a keyword added to a selector that lets you style a specific part of the selected element(s). For example, ::first-line can be used to change the font of the first line of a paragraph. The general syntax for CSS Pseudo-elements looks like this: In CSS pseudo- elements It looks just like normal styling statements but with … Read more

Categories CSS

CSS Dropdown

CSS Dropdown menus are used to hide a predefined list within a button. HTML) Use any element to open the dropdown content, e.g. a <span>, or a <button> element. Use a container element (like <div>) to create the dropdown content and add whatever you want inside of it. Wrap a <div> element around the elements to … Read more

Categories CSS

CSS Web fonts

CSS Web fonts allows custom fonts to be loaded on a webpage. Once added to a stylesheet, the rule instructs the browser to download the font from where it is hosted, then display it as specified in the CSS. You will have a @font-face block at the start of the CSS, which specifies the font file(s) to download: … Read more

Categories CSS

CSS Color

CSS color values to specify a color. Typically, these are used to set a color either for the foreground of an element (i.e., its text) or else for the background of the element. They can also be used to affect the color of borders and other decorative effects. the example below sets the background colors … Read more