CSS3

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

What does the cascading portion of CSS mean?

- Cascading order - System to sort various CSS declarations to avoid conflicts - Cascading occurs if multiple styles are defined for an element - Applies style from most specific declaration to least

What is a class?

A class is a style (i.e., a group of CSS attributes) that can be applied to one or more HTML elements. This means it can apply to instances of the same element or instances of different elements to which the same style can be attached. Classes are defined in CSS using a period followed by the class name. It is applied to an HTML element via the class attribute and the class name. The following snippet shows a class defined, and then it being applied to an HTML DIV element. .classexample {font-family: Helvetica; font-size: 20; background: black;} <div class="classexample">....</div> Also, you could define a style for all elements with a defined class. This is demonstrated with the following code that selects all P elements with the column class specified. p.column {font-color: black;}

What is an ID selector?

An ID selector is a name assigned to a specific style. In turn, it can be associated with one HTML element with the assigned ID. Within CSS, ID selectors are defined with the # character followed by the selector name. The name can contain characters a-z, A-Z, digits 0-9, period, hyphen, escaped characters, and so forth. The following snippet shows the CSS example1 defined followed by the use of an HTML element's ID attribute, which pairs it with the CSS selector. #example1: {background: blue;} <p id="selector">...</p>

What are some of the new features and properties in CSS3? (Name 10)

Box model, New Web fonts, Rounded corners, Border Images, Box Shadows, Text Shadows, New Color schemes (RGBA), Transform property, New Pseudo-classes, Multi-column layout, New Gradients

What is CSS?

CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to solve a problem External Style Sheets can save a lot of work External Style Sheets are stored in CSS files

What are different ways to apply styles to a Web page?

Inline: HTML elements may have CSS applied to them via the STYLE attribute, Embedded: CSS may be embedded in a Web page by placing the code in a STYLE element within the HEAD element, Linked: CSS may be placed in an external file (a simple text file containing CSS) and linked via the link element, Imported: Another way to utilize external CSS files via @import.

Why shouldn't I use fixed sized fonts ?

Often times, fixed font sizes will show up incorrectly on the user end and will prohibit responsiveness. Using relative sizing will keep fonts proportionate in their relationships to each other and will allow for greater end user flexibility.

Which font names are available on all platforms ?

Only five basic font families( serif, sans-serif, cursive, fantasy, and monospace) are recognized across platforms, rather than specific fonts. Specific font name recognitions will vary by browser.

Is CSS case-sensitive?

The CSS standard is not case-sensitive, but if an XHTML doctype is used, then CSS class names will be case-sensitive in some browsers. In addition, items like font families, image URLs, and other direct references with the style sheet can be case-sensitive. To be safe, you should stick with lower-case to avoid confusion or unexpected problems.

Explain the difference between visibility:hidden and display:none

visibility:hidden simply hides the element, while it will still take up space and affect the layout of the document. display:none also hides the element, but will not take up space and the page will appear as if the element is not present.


Ensembles d'études connexes

World History 1 Ch 24. Medieval Civilization & Christianity L 1-10

View Set

Ch 24 Structure and a function of Kidneys

View Set

ELECTRICITY AND ELECTRONICS TRAINING SERIES. MODULE 7-SOLID-STATE DEVICES AND POWER SUPPLIES

View Set

Chapter V: Entrepreneurship & Starting a Small Business

View Set

Microeconomics Ch4- Demand, Supply, and Equilibrium

View Set

ECON 302 - Exam 2 Study Questions

View Set

Quiz 7 & 8 Sectional Anatomy Combined

View Set