Computer Engineering

CST8238 Web Programming

What are main benefits of using CSS?

It allows you to quickly make changes to one or several html files appearance.

What are different parts of a CSS style rule?

Theres a selector and a declaration block, first you type the element or tag you wish to edit, and then you open a curly brace and type in several declarations, separated by semi colons.

What are an element selector and grouped element selector in CSS?

An element selectors look like this: p { color: black; }
while a grouped element selector is several tags like this: p, h1, h2 { color: black; }

What are class selectors in CSS? What are id selectors in CSS?

If you have given an element a specific id like #first you can use that id to modify it like this:
#first { color: grey; }
If you made a html class then you can also edit it the same way but you must add a dot at the beginning:
.class { color: grey; }

What are contextual selectors in CSS?

Their used to modify tags that occur inside other tags or elements.

What are the three cascade principles used by browsers when style rules conflict?

Inheritance, Cascade and Specificity.