pseudo classes in CSS – part 3 (:visited)

Note: This is the third part of the 5 part series dedicated to the pseudo classes of CSS.

In this part, we’ll understand the the pseudo class :visited but if you want to jump to any other pseudo class, be my guest and click on the links provided below…


This content originally appeared on DEV Community and was authored by Rajat Gupta

Note: This is the third part of the 5 part series dedicated to the pseudo classes of CSS.

In this part, we'll understand the the pseudo class :visited but if you want to jump to any other pseudo class, be my guest and click on the links provided below:

part 1: pesudo class :hover

part 2: pseudo class :link

part 3: pseudo class :visited - yet to be written

part 4: pseudo class: active - yet to be written

part 5: LVHA order - yet to be written.

Use the :visited selector to style links to visited pages.

If you have read about the :link selector above, understand that the :visited is exactly opposite of it. let me tell you how.

We saw in the :link selector that initially the text's color is defined in the :link selector and the color changes to default only after it is clicked.

However, in :visited the text will initially have the default color and only when we click on it, the color will change to the one defined in the :visited selector.

The :visited selector is used to style links to visited pages as compared to the :link selector which is used to style links to unvisited pages.

WORK IN PROGRESS


This content originally appeared on DEV Community and was authored by Rajat Gupta


Print Share Comment Cite Upload Translate Updates
APA

Rajat Gupta | Sciencx (2022-02-10T21:55:04+00:00) pseudo classes in CSS – part 3 (:visited). Retrieved from https://www.scien.cx/2022/02/10/pseudo-classes-in-css-part-3-visited/

MLA
" » pseudo classes in CSS – part 3 (:visited)." Rajat Gupta | Sciencx - Thursday February 10, 2022, https://www.scien.cx/2022/02/10/pseudo-classes-in-css-part-3-visited/
HARVARD
Rajat Gupta | Sciencx Thursday February 10, 2022 » pseudo classes in CSS – part 3 (:visited)., viewed ,<https://www.scien.cx/2022/02/10/pseudo-classes-in-css-part-3-visited/>
VANCOUVER
Rajat Gupta | Sciencx - » pseudo classes in CSS – part 3 (:visited). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/02/10/pseudo-classes-in-css-part-3-visited/
CHICAGO
" » pseudo classes in CSS – part 3 (:visited)." Rajat Gupta | Sciencx - Accessed . https://www.scien.cx/2022/02/10/pseudo-classes-in-css-part-3-visited/
IEEE
" » pseudo classes in CSS – part 3 (:visited)." Rajat Gupta | Sciencx [Online]. Available: https://www.scien.cx/2022/02/10/pseudo-classes-in-css-part-3-visited/. [Accessed: ]
rf:citation
» pseudo classes in CSS – part 3 (:visited) | Rajat Gupta | Sciencx | https://www.scien.cx/2022/02/10/pseudo-classes-in-css-part-3-visited/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.