2_Computer science grade 10 CSS_presentation_ 2 variant
Оценка 4.6

2_Computer science grade 10 CSS_presentation_ 2 variant

Оценка 4.6
pptx
09.05.2020
2_Computer science grade 10 CSS_presentation_ 2 variant
2_Computer science grade 10 CSS_presentation_ 2 variant.pptx

Cascading Style Sheets (CSS) 10

Cascading Style Sheets (CSS) 10

Cascading Style Sheets (CSS)

10.4.2.1 use HTML in web-development;

Styling HTML with CSS CSS stands for

Styling HTML with CSS CSS stands for

Styling HTML with CSS

CSS stands for Cascading Style Sheets.

CSS describes how HTML elements are to be displayed on screen, paper, or in other media.

CSS can be added to HTML elements in 3 ways:

Inline - by using the style attribute in HTML elements
Internal - by using a

Inline CSS An inline CSS is used to apply a unique style to a single

Inline CSS An inline CSS is used to apply a unique style to a single

Inline CSS

An inline CSS is used to apply a unique style to a single HTML element.
An inline CSS uses the style attribute of an HTML element.

This example sets the text color of the

element to blue:

This is a Blue Heading

This is a Blue Heading

Internal CSS An internal CSS is used to define a style for a single

Internal CSS An internal CSS is used to define a style for a single

Internal CSS

An internal CSS is used to define a style for a single HTML page.
An internal CSS is defined in the section of an HTML page, within a

This is a heading

This is a paragraph.

External CSS An external style sheet is used to define the style for many

External CSS An external style sheet is used to define the style for many

External CSS

An external style sheet is used to define the style for many HTML pages.
To use an external style sheet, add a link to it in the section of the HTML page:

This is a heading

This is a paragraph.

This is a heading

This is a paragraph.

An external style sheet can be written in any text editor

An external style sheet can be written in any text editor

An external style sheet can be written in any text editor.
The file must not contain any HTML code, and must be saved with a .css extension.

body {     background-color: powderblue; } h1 {     color: blue; } p {     color: red; }

CSS Fonts The CSS color property defines the text color to be used

CSS Fonts The CSS color property defines the text color to be used

CSS Fonts

The CSS color property defines the text color to be used.
The CSS font-family property defines the font to be used.
The CSS font-size property defines the text size to be used.

CSS Border The CSS border property defines a border around an

CSS Border The CSS border property defines a border around an

CSS Border

The CSS border property defines a border around an HTML element:
p {     border: 1px solid powderblue; }

CSS Padding

The CSS padding property defines a padding (space) between the text and the border:
Example
p {     border: 1px solid powderblue;     padding: 30px; }

CSS Margin

The CSS margin property defines a margin (space) outside the border:
p {     border: 1px solid powderblue;     margin: 50px; }

CSS Syntax and Selectors A CSS rule-set consists of a selector and a declaration block:

CSS Syntax and Selectors A CSS rule-set consists of a selector and a declaration block:

CSS Syntax and Selectors

A CSS rule-set consists of a selector and a declaration block:

The declaration block contains one or more declarations separated by semicolons.
Each declaration includes a CSS property name and a value, separated by a colon.

The id Attribute To define a specific style for one special element, add an id attribute to the element:

The id Attribute To define a specific style for one special element, add an id attribute to the element:

The id Attribute

To define a specific style for one special element, add an id attribute to the element:

I am different


then define a style for the element with the specific id:

Examples

#p01
{     color: blue; }

#para1 {     text-align: center;     color: red; }

The class Attribute To define a style for a special type of elements, add a class attribute to the element:

The class Attribute To define a style for a special type of elements, add a class attribute to the element:

The class Attribute

To define a style for a special type of elements, add a class attribute to the element:

I am different


then define a style for the elements with the specific class:

Examples

.center {     text-align: center;     color: red; }

p.center {     text-align: center;     color: red; }

Материалы на данной страницы взяты из открытых истончиков либо размещены пользователем в соответствии с договором-офертой сайта. Вы можете сообщить о нарушении.
09.05.2020