Found 1566 Articles for CSS

Which element is used to add special style to the first letter of the text in a selector with CSS

Chandu yadav
Updated on 13-Mar-2020 13:04:04

63 Views

Use the :first-letter element to add special effects to the first letter of elements in the document. You can try to run the following code to add special styles to the first letter of text −ExampleLive Demo                    p:first-letter {             font-size: 5em;          }          p.normal:first-letter {             font-size: 10px;          }                     First character of this paragraph will be ... Read More

Usage of CSS :first-line pseudo-element

Samual Sam
Updated on 13-Mar-2020 13:03:22

73 Views

Use this element to add special styles to the first line of the text in a selector. The following example demonstrates how to use the :first-line element to add special effects to the first line of elements in the document.ExampleLive Demo                    p:first-line {             text-decoration: underline;          }          p.noline:first-line {             text-decoration: none;          }                     This line would ... Read More

How to change the color of focused links with CSS

karthikeya Boyini
Updated on 05-Mar-2020 05:01:04

1K+ Views

Use the :focus class to change the color of focused links. Possible values could be any color name in any valid format.ExampleYou can try to run the following code to implement the color of the focused link −                    a:focus {             color: #0000FF          }                     This is demo link    

How to change the color of active links with CSS

Chandu yadav
Updated on 05-Mar-2020 04:59:07

4K+ Views

Use the :active class to change the color of active links. Possible values could be any color name in any valid format. ExampleYou can try to run the following code to implement the color of an active link −                    a:active {             color: #FF00CC          }                     My Link    

CSS outline-width property

Samual Sam
Updated on 25-Jun-2020 11:38:13

167 Views

The outline-width property is used to set the width of the outline. Its value should be a length or one of the values thin, medium, or thick, just like the border-width attribute.Example                            This text is having thin outline.                            This text is having thick outline.                            This text is having 5x outline.          

Usage of :lang pseudo-class in CSS

Arjun Thakur
Updated on 04-Mar-2020 12:46:57

87 Views

Use the :lang pseudo class to specify a language to use in a specified element. This class is useful in documents that must appeal to multiple languages that have different conventions for certain language constructs.ExampleYou can try to run the following code to understand the usage of :lang pseudo class                    /* Two levels of quotes for two languages*/          :lang(en) { quotes: '"' '"' "'" "'"; }          :lang(fr) { quotes: "" ""; }                     ...A quote in a paragraph...    

Usage of :first-child pseudo-class in CSS

karthikeya Boyini
Updated on 04-Mar-2020 12:46:22

67 Views

Use the :first-child pseudo class to add special style to an element that is the first child of some other element.ExampleYou can try to run the following code to understand the usage of :first-child pseudo class −                    div > p:first-child          {             text-indent: 25px;          }                              First paragraph in div. This paragraph will be indented          Second paragraph in div. This paragraph will not be indented                But it will not match the paragraph in this HTML:                Heading          The first paragraph inside the div. This paragraph will not be effected.          

Commonly used pseudo-classes in CSS

Chandu yadav
Updated on 30-Jul-2019 22:30:22

525 Views

Following are some of the commonly used pseudo-classesValueDescription:linkUse this class to add special style to an unvisited link.:visitedUse this class to add special style to a visited link.:hoverUse this class to add special style to an element when you mouse over it.:activeUse this class to add special style to an active element.:focusUse this class to add special style to an element while the element has focus.:first-childUse this class to add special style to an element that is the first child of some other element.:langUse this class to specify a language to use in a specified element. Read More

Usage of :active pseudo-class in CSS

Samual Sam
Updated on 04-Mar-2020 12:45:38

81 Views

The :active pseudo-class is used to add special style to an active element. Possible values could be any color name in any valid format.Example                    a:active {             color: #FF00CC;          }                     Click This Link    

Usage of :hover pseudo-class in CSS

Ankith Reddy
Updated on 04-Mar-2020 12:45:06

114 Views

The :hover pseudo class is used to add special style to an element when you mouse over it. Possible values could be any color name in any valid format.Example                    a:hover {             color: #FFCC00          }                     Bring Mouse Here    

Advertisements