You develop an HTML5 webpage. You have the following HTML markup: (Line numbers are for
reference only.)
The webpage also contains the following CSS markup:
You need to determine how the webpage will appear when the CSS styles are applied.
Select two.
A.
The first row of the table will have a red background.
B.
The second row of the table will have a red background.
C.
The second cell in the first row of the table will have a blue background.
D.
The second cell in the third row of the table will have a blue background.
E.
The second cell in the third row of the table will have not have blue background.
Explanation:
A y D
A + D
Incorrect answers.
The correct answers are A, D. Moreover the table in the picture is wrong.
I typed this whole code and got the result “A,C,D” because in every row 2nd column will be blue, so “C” will also be included.
Hi nazish ali. When you typed it, I think you missed something…in the first , there are no elements. They are elements instead. So C is wrong, but A and D are correct.
a&c&d
the picture is wrong
Hi emnsy. C is not correct. The first element has no elements so the td:nth-of-type(even) doesn’t apply to it.
A & D
See for yourself:
http://jsfiddle.net/Ld9h0vkn/
+1, that’s exactly what I did, A + D is the right answer
Thank you MG!! That’s correct.
The answer is wrong, it suppose to be A & D only. The first row, all cell’s background is red then in the last row, only the first cell and the third cell are red. On the second cell, the from the second row until third row the background is blue.
Here’s the confirmation:
table { border: 1px solid black; font-family: Arial; }
tr:nth-child(odd){ background-color: red; }
tr td:nth-of-type(even) {background-color: blue; }
Fruit
Quantity
Price
Apple
48
$0.29
Banana
72
$0.19
Watermelon
14
$3.99
table { border: 1px solid black; font-family: Arial; }
tr:nth-child(odd){ background-color: red; }
tr td:nth-of-type(even) {background-color: blue; }
Fruit
Quantity
Price
Apple
48
$0.29
Banana
72
$0.19
Watermelon
14
$3.99
table { border: 1px solid black; font-family: Arial; }
tr:nth-child(odd){ background-color: red; }tr td:nth-of-type(even) {background-color: blue; }FruitQuantityPrice
Apple48$0.29Banana72$0.19Watermelon14$3.99
Sorry guys I’d been trying to share the code and the picture but it cant get posted here’s the link for the code: https://drive.google.com/file/d/0B3ZBAHH9-l8-bEw0emFFZGRzVU0/view?usp=sharing
For the picture : https://drive.google.com/file/d/0B3ZBAHH9-l8-aVJ1czQzUE5ENE0/view?usp=sharing
The correct answer is A and D
here’s the link for the code: https://drive.google.com/file/d/0B3ZBAHH9-l8-bEw0emFFZGRzVU0/view?usp=sharing
For the picture : https://drive.google.com/file/d/0B3ZBAHH9-l8-aVJ1czQzUE5ENE0/view?usp=sharing
Victor you were close ,i think you made a minor error on your code check line 30. You should remove tr so that your code would be correct. Yes the correct answer is A and D.
tested answer is A&D
Correct Answer ACD
Complete code is here:
table{
border: 1px black solid;
font-family: Arial;
}
tr:nth-child(odd){
background-color: red;
}
tr td:nth-of-type(even)
{
background-color: blue;
}
Fruit
Quantity
Price
Apple
45
23.5
Banans
29
14
Watermallen
2
14
C is incorrect because the cells of the first row are “TH”, not “TD”, so the CSS selector “tr td:nth-of-type(even)” don’t affect this row.
That is the finish of this post. Here youll obtain some web sites that we consider youll value, just click the hyperlinks.
Wonderful story, reckoned we could combine a handful of unrelated data, nevertheless really worth taking a search, whoa did one master about Mid East has got more problerms also
we came across a cool web-site that you just may well love. Take a search for those who want
check beneath, are some completely unrelated internet sites to ours, having said that, they are most trustworthy sources that we use
although web sites we backlink to beneath are considerably not related to ours, we feel they’re actually worth a go by means of, so have a look
table{
border:1px solid black;
font-family:Arial;
}
tr:nth-child(odd){
background-color:Red;
}
tr td:nth-of-type(even){background-color:blue;}
1
2
3
1a
2b
3c
1a
2b
3c
1qw
2qw
3qw
correct answer : C , D
table{
border:1px solid black;
font-family:Arial;
}
tr:nth-child(odd){
background-color:Red;
}
tr td:nth-of-type(even){background-color:blue;}
1
2
3
1a
2b
3c
1a
2b
3c
1qw
2qw
3qw
correct answer : A, D
didn’t pay attention on TH of the table
BCD are correct
can some1 provide correct 100% answer,not just bothering every1 with their opinions…in IT you MUST know the RIGHT answer!