Chapter 4 Flashcards
(34 cards)
What is block elements? Examples?
It takes up the full width of the space available to them and force the next element down to the new ling on the page.
<div> <h1> </h1><p> tags</p></div>
What is inline elements? Examples?
Elements only take up space needed to display their content.
<img></img> <span> <a> </a></span>
What are the four different positioning properties?
Top, bottom, left and right properties
What are the three values for overflow property?
overflow: scroll;
overflow: hidden;
overflow: visible;
What is visible overflow?
It is the default value for all elements. And it allows the content to flow outside of its container element.
What is hidden overflow?
Content inside of an element that takes up more space than the dimensions of the element will not be visible in the browser window.
What is CSS?
CSS stands for Cascading Style Sheets because styles are usually defined in a separate file or sheet and are read from top to bottom. The latest standard for CSS is CSS3, which also contains all of the older CSS styles and is therefore considered backwards compatible
CSS internal, external and inline?
Internal= CSS styles can be inserted directly inside the start and end tags of an HTML document using tags
Inline styles are applied directly inside an elements start tag by using the style attribute. Inline styles affect only the element containing the style attribute. Inline styles use a different syntax than internal and external styles. Since the styles are applied directly within an elements start tag, it is not necessary to specify what tag should be selected.
What are CSS rules?
A rule consists of two parts: a selector (what is to be styled), and a declaration block.
The declaration block contains one or more declarations used to style the selector. Each declaration consists of a CSS property, the selector attribute to be changed and a value, the desired value of the attribute.
How to type comments in css?
Anything between forward slash and asterisk /* and forward slash */ will not be rendered by the browser.
/This is a CSS comment/
What are the common types of CSS selectors>
Classes and IDs.
What is an ID selector?
IDs uniquely identify one element in a document, such as id=”firstName” for the First Name form field. IDs can only be applied one time in a document and elements can only have one ID assigned to it.
ID value is prefixed with the # sign
What is a class selector?
You use a class to identify one or more elements to be styled in the same manner, such as a group of elements that needs to be in small print or a specific color. Classes can be applied to multiple elements in a document and multiple classes may be applied to an element.
Class value is prefixed with . sign.
What is not allowed when using class and ID selector?
Class and ID selector names cannot start with a number and cannot include spaces or special characters.
What are CSS text properties?
text-align:center;
text-decoration:underline;
text-indent:50 px;
What are CSS font properties?
font-family
font-size
font-style
font-weight
What are the four states of Hyperlinks?
Unvisited
Visited
Hover
Active
What is a pseudo-classes?
Pseudo-classes assign a style only when the selector is in a certain state. In this case, the pseudo-class is added to the <a> anchor selector.</a>
What are CSS text properties?
text-align:center;
text-decoration:underline;
text-indent:50 px;
What are CSS font properties?
font-family
font-size
font-style
font-weight
What are the four states of Hyperlinks?
Unvisited (link)
Visited
Hover
Active
What is a pseudo-classes?
Pseudo-classes assign a style only when the selector is in a certain state. In this case, the pseudo-class is added to the <a> anchor selector.</a>
a: link
a: visited
a: hover
a: active</a>
What is inline elements?
Inline elements only take up as much space as required to hold the data in them and will be placed on the screen horizontally. The <img></img>, <span> and <a> elements are considered inline-elements because they only take up the space needed to display their content. For example, placing two <img></img> tags next to each other will appear on the same line as long as there is available space.</a></span>
What is block elements?
Block elements take up the full width of the space available to them and force the next element down to a new line on the page. The <div>, <h1> and </h1><p> tags are block elements because they will force any element or content following them down to the next line on the page.</p></div>