If you have not already done so...
csis390/
.csis390
folder for storing your lab work, i.e.,
csis390/labs
.lab1, lab2, ..., lab3
.We will use files with identical names, but different extensions, i.e., part4.html
and part4.css
.
You may confuse them if you do not do the following:
In Windows, make sure you display hidden files, folders, and filename extensions
Consider the following web page with embedded CSS code:
What color is each of the following?
part1.html
and then
validate it at html5.validator.nu/
part1.html
file to the rigtht of each item.<li>List Item</li> <!-- this is red -->
List Item
is green, but we never specified the color of the li
tag.
Explain why List Item
is green and explain the general rule about how CSS is applied
to content nested in HTML.
Put your explanation (as least two sentences) in an HTML comment at the top of part1.html
.
Consider the following web page with embedded CSS code:
What color is each of the following?
part2.html
and then
validate it at html5.validator.nu/
part2.html
file to the rigtht of each item.<p>Paragraph in body</p> <!-- this is cyan -->
main
should be orange, but the paragraph in main is cyan.
With these examples in mind, explain the general rule about how CSS is applied to content nested in HTML.
Put your explanation (as least three sentences) in an HTML comment at the top of part2.html
.
class
and id
SelectorsConsider the following web page with embedded CSS code:
What color is each of the following?
part3.html
and then
validate it at html5.validator.nu/
part3.html
file to the rigtht of each item.<th>First name</th> <!-- this is pink -->
td
elements are red, but Doe
is green.
Obviously, we created a class
called "special" to apply green to elements.
But, now consider that Rocket
is cyan and Special Paragraph
is pink.
Explain which selectors have higher priority.
Put your explanation (as least three sentences) in an HTML comment at the top of part3.html
.
Consider the following web page with linked, embedded and inline CSS code:
Note thatpart4.css
contains the following CSS code:
div { border: 1px solid black; background-color: red; padding: 2px; }
What color is each of the following?
part4.html
and
validate it at html5.validator.nu/
part4.css.
and
validate it at jigsaw.w3.org/css-validator/
part4.html
file to the rigtht of each item.First division <!-- background color is red -->
part4.html
part4.html
does not have any CSS code to make it red?part4.css
clearly has code to make the padding 2px?class
that should make it green?part4.html
as part4a.html
div
look like the following:main
and give it a border that is solid 10px cyanmain
a width of 606pxmain
to autodiv
to float to the rightdiv
to approximate the image above.part4a.html
part4a.html
as part4b.html
div
look like the following:div
and set the margin to 0.div
's side-by-side in the 606px wide main
content areadiv
's to fitpart4b.html
Create a zip file of your lab3
folder called lab3.zip
and submit the file in Canvas.
Put your partner's name in the comment area of Canvas.
The deliverable must be submitted in Canvas by midnight on the day before your next scheduled lab meeting. If you wish to work alone, you can submit the deliverable yourself. However, if you are assigned a partner, you can work together outside of lab and submit one deliverable together. When submitting as a lab pair, be sure to include your partner's name in the comment area when you submit via Canvas.
Outside of lab, you are only permitted to work with your lab partner. Do not share your work with any other student.