Reading-Notes

The web site hold my reading notes in code 201.


CSS



CSS Introduction

CSS What is CSS !!

CSS (Cascading Style Sheets) allows you to style web pages. CSS can be used for very basic document text styling.

— for example changing the color and size of headings and links.

It can be used to create layout — for example turning a single column of text into a layout with a main content area and a sidebar for related information.

It can even be used for effects such as animation. css The rule opens with a selector . This selects the HTML element that we are going to style. In this case we are styling level one headings (<h1>).

We then have a set of curly braces { }. Inside those will be one or more declarations, which take the form of property and value pairs. Each pair specifies a property of the element(s) we are selecting, then a value that we’d like to give the property.

Before the colon, we have the property, and after the colon, the value. CSS properties have different allowable values, depending on which property is being specified. In our example, we have the color property, which can take various color values. We also have the font-size property. This property can take various size units as a value. ___

Applying CSS to HTML


In 3 method : css

The difference between an ID and a class is that an ID can be used to identify one element, whereas a class can be used to identify more than one.

Some Properties

align-content Specifies the alignment between the lines inside a flexible container when the items do not use all available space
color Sets the color of text
background A shorthand property for all the background-* properties
font A shorthand property for the font-style, font-variant, font-weight, font-size/line-height, and the font-family propertiess
float Specifies whether an element should float to the left, right, or not at all
margin Sets all the margin properties in one declaration

Back to homw page