100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
CSS Questions and Answers $12.99   Add to cart

Exam (elaborations)

CSS Questions and Answers

 5 views  0 purchase
  • Course
  • PCSS
  • Institution
  • PCSS

CSS Questions and Answers Understanding CSS - What is the key to understanding CSS? What are three examples of the styles css lets you edit? The key to understanding how css works is to imagine that there is an invisible box around every html element. CSS allows you to create rules that control t...

[Show more]

Preview 3 out of 17  pages

  • November 24, 2024
  • 17
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • PCSS
  • PCSS
avatar-seller
Pogba119
CSS Questions and Answers
Understanding CSS - What is the key to understanding CSS? What are three examples
of the styles css lets you edit? - answer The key to understanding how css works is
to imagine that there is an invisible box around every html element. CSS allows you to
create rules that control the way that each individual box is presented.
Ex styles:
Boxes - Width and height, borders, background color and images.
Text - Typeface, size, color, italics and bold uppercase.
Specific -There are also specific ways in which you can style certain elements such as
lists, tables, and forms.

CSS format - How does css format work? What are the two parts? Define the two. -
answer CSS works by associating rules with HTML element. A CSS rule contains
two parts a selector and a declaration.
Selectors - Indicate which element the rule applies too. The same rule can apply to
more than one element. If you separate the element names with commas.
Declarations - Indicates how the element should be styled. They are split into two parts
(a property and value) and are separated by a colon.

Declarations - What is a declaration? How many parts is it made of? Can you specify
more than one properties in one delceration? - answer Css declarations sit inside
curly brackets and each is made up of two parts: a property and a value, separated by a
colon. You can specify several properties in one declaration, each separated by a semi
colon.

Properties - Indicate the aspects of the element you want to change.
Values - Specify the setting you want to use for the chose properties

Using external CSS - What is the element to use external CSS? What are the three
attributes you need? what should the name of the file be? - answer <link> - The link
element can be used in a html document to tell the browser where to find the css file
used to style the page. It's an empty element, and it lives inside the <head> element. It
should use three attributes:
href - This specifies the path to the css file
type - This attribute specifies the type of doc being linked. The value should be text/css
rel - This specifies the relationship between the html page and the file it's linked too. the
value should be stylesheet when linking to a css file.
*An html page can use more than one css style sheet. To do this have multiple <link>
elements for every css file.

Using internal css - What is the element? What attribute should you use? - answer
<style> - You an also include CSS rules within an html page by placing them inside a
<style> element, which usually sits inside the <head> element of the page. The <style>

,element should use the type attribute to indicate that the styles are specified in css. The
value should be text/css.
**When building a size with more than one page, you should use an external css style
sheet.**

CSS Selectors - What are the 8 common css selectors? - answer There are many
different types of css selectors, that allow you to target rules to specify elements in an
html doc. CSS selectors are case sensitive, so they must match element names and
attribute values exactly.

Selector: Meaning:
Universal Selector *{} Applies to all elements
Type Selector h1,h2{} Matches element names
Class Selector .note{}. Matches element with class value
ID selector #idvalue{} Matches an element with id value
Child selector li>a {} Matches an element thats a child of another
Descendant selector p a {} matches an element that is a descendant of another
Adjacent sibling selector h1+p{} matches element that is next sibling of another
General sibling selector h1^p{} Matches an element that is a sibling of another.

Rules Cascade - What are the three main reasons a css rule might take precedence
over another? - answer If there are two more rules that apply to the same element,
its important to understand which takes precedence.
Last rule - If the two selectors are identical, the latter of the two will take precedence.
Specificity - If one selector is more specific than the others, the more specific rule will
take precedence over more general ones.
Important - You can add !important after any property value to indicate its more than
other rules.

Inheritance - How does inheritance work in css? - answer If you specify the font-
family or color properties on the <body> element, they will apply to most child elements.
This is b/c the value of the font-family property is inherited by child elements.
You can compare this with the background color of border properties they are not
inherited by child elements.
You can force a lot of properties to inherit values from their parent elements by using
inherit for the values of the properties.

Foreground color - What property allows us to change the color of text inside an
element? What are the three ways you can specify color? - answer Color: The color
property allows you to specify the color of text inside an element you can specify any
color in css in one of three ways.
RBG values - These express colors in terms of how much red, green , and blue are
used to make it up.
Hex codes - these are six-digit codes that represent the amount of red, green, and blue
in a color. Preceded by a pound or has sign.
Color names - There are 147 predefined color names that are recognized by browsers.

, Comments - How do we add comments in CSS? - answer /* /* - CSS allows you to
add comments with these symbols.

Background color- What property allows us to change the background color? How many
ways can you specify your choices? What happens if you dont specify a color? - answer
background - color - Css treats each html element as if it appears in a box and the back
ground color property sets the color of the background for that box. You can specify
your choice of color in the same three ways you can specify for foreground colors: RGB
values, Hex codes, and color names.
If you don't specify a color, then the background is transparent.

Understanding color - Not really for studying! - answer RGB values - Values for red,
green, and blue are expressed as numbers between 0 and 225.

Hex codes - Hex values represent values for red, green, and blue in hexadecimal code.

Color names - Colors are represented by predefined names.

Hue - Hue is near to the colloquial idea of color.

Saturation - Saturation refers to the amount of gray in a color. At max saturation, there
would be no gray in the color. At minimum, the color would be mostly gray.

Brightness - Brightness refers to how much black is in a color. At max there in no black,
and at minimum very dark.

Contrast - What are the three different types of contrast? How are they different? -
answer When picking foreground and background colors, it's important to ensure that
there is enough contrast for the text to be legible.
Low Contrast - Text is harder to read
High Contrast - Text is easier to read unless it's a lot of text.
Medium Contrast - Used for long spans of text.

Opacity - What does opacity allow you to do? What is the value? What is another way to
also include opacity? - answer Opacity - The opacity property allow you to specify
the opacity of an element and any of its child elements. The value is a number between
0.0 and 1.0.

rgba - Adds a fourth property to indicate opacity. this value is known as an alpha value
and is a number between 0.0 and 1.0.

HSL and HSLA - What does this property do? What values does it use? What does
HSLA do? - answer HSL - this property gives an alternative way to specify color. The
value of the property starts with the letters hsl, followed by values in parenthesis.
Hue - This is expressed as an angles (0 - 360)

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller Pogba119. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $12.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

62890 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$12.99
  • (0)
  Add to cart