Nth-Child Selector Example
Selecting article(first-of-type) with nth-child element in article selected; background changed to blue.
In this assignment you are to demonstrate the using of the types of selectors covered in this unit. You may accomplish this in a single web page OR using three different web pages (such as in a web site). You may create new web pages OR modify an existing web page project.
Create or modify a web page that demonstrates the use of the following:
Selecting article(first-of-type) with nth-child element in article selected; background changed to blue.
1. Attribute selector used to style image with a border by using 'duck' in 'alt' attribute.
2. Attribute selector used to style image with a purple border that starts with 'cat' in 'alt' attribute.
1. Combinator selector used to select paragraph by choosing the first paragraph child in an element that contains the characters "combinator" in the class element.
2. Combinator selector used to select images and put a black border around all images inside parent element article:last-child within the section element.