Table of Content

CSS MCQ : Dynamic Pseudo Classes (Multiple Choice Questions)


Congratulations - you have completed CSS.

You scored %%SCORE%% out of %%TOTAL%%.

Your performance has been rated as %%RATING%%


Your answers are highlighted below.
Question 1
Following CSS code is written -
<style>
            a:link {
                color:#FF0000;
            }
            a:visited {
                color:#00FF00;
            }
            a:hover {
                color:#FF00FF;
            }
            a:active {
                color:#0000FF;
            }
        </style>
Guess in which color link will be displayed if user has not clicked on any of the link before.
A
#FF0000
B
#00FF00
C
#FF00FF
D
#0000FF
Question 2
Following CSS code is written -
<style>
            a:link {
                color:#FF0000;
            }
            a:visited {
                color:#00FF00;
            }
            a:hover {
                color:#FF00FF;
            }
            a:active {
                color:#0000FF;
            }
        </style>
User have created 5 pages and included same css in each page. Each page having list of all 5 pages with links. User is currently viewing 5.html then color of 5.html will be _______.
A
Red
B
Green
C
Blue
D
#FF00FF
Question 3
a{
    text-decoration: none;
}

a:focus,
a:hover {
    text-decoration: underline;
}
Unvisited link will be displayed with underline. Say True or False.
A
True
B
False
Question 3 Explanation: 
Only hovered and focused links will be having underline.
Question 4
Currently clicking and holding down the mouse button on represents ___________ pseudo class.
A
a:link
B
a:visited
C
a:active
D
a:hover
Question 5
Following CSS code is written -
<style>
            a:link {
                color:#FF0000;
            }
            a:visited {
                color:#00FF00;
            }
            a:hover {
                color:#FF00FF;
            }
            a:active {
                color:#0000FF;
            }
        </style>
After visiting link from IE 8 , user have open to newly installed Google Chrome for very first time.Color of link visited inside IE8 will be -
A
#FF0000
B
#00FF00
C
#FF00FF
D
#0000FF
Question 5 Explanation: 
Browser cache is different for different browser so link opened inside IE will be considered as "Non Visited" link inside Google Chrome.
Once you are finished, click the button below. Any items you have not completed will be marked incorrect. Get Results
There are 5 questions to complete.