Chapter 4 Flashcards
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;