Exercise 205-07-09: Write some :nth-of-type selectors

Example 1 - :nth-of-type(3)

1st of type

2nd of type

DIV element should be ignored

3rd of type

4th of type

5th of type

6th of type

7th of type

DIV element should be ignored

8th of type

9th of type

10th of type

11th of type

12th of type

Example 2 - :nth-of-type(3n)

1st of type

2nd of type

DIV element should be ignored

3rd of type

4th of type

5th of type

6th of type

7th of type

DIV element should be ignored

8th of type

9th of type

10th of type

11th of type

12th of type

Example 3 - :nth-of-type(3n+1)

1st of type

2nd of type

DIV element should be ignored

3rd of type

4th of type

5th of type

6th of type

7th of type

DIV element should be ignored

8th of type

9th of type

10th of type

11th of type

12th of type

Example 4 - :nth-of-type(3n-1)

1st of type

2nd of type

DIV element should be ignored

3rd of type

4th of type

5th of type

6th of type

7th of type

DIV element should be ignored

8th of type

9th of type

10th of type

11th of type

12th of type

Example 5 - :nth-of-type(even)

odd of type

even of type

DIV element should be ignored

odd of type

even of type

odd of type

even of type

odd of type

DIV element should be ignored

even of type

odd of type

even of type

odd of type

even of type

Example 6 - :nth-of-type(odd)

odd of type

even of type

DIV element should be ignored

odd of type

even of type

odd of type

even of type

odd of type

DIV element should be ignored

even of type

odd of type

even of type

odd of type

even of type