.


:




:

































 

 

 

 


2. CSS

CSS

CSS (. Cascading Style Sheets ) HTML XHTML.CSS WEB.

CSS , . () HTML, - , , , .. CSS. CSS :

;

;

(, , . .);

.

CSS HTML

, HTML-, , :

1. ( .css -) link;

2. HTML- ( css-) style;

3. inline-, HTML- , HTML- style.

(external style sheets)

< link >, < head > :

<link rel=stylesheet type=text/css href=mystyle.css media=all />

HTML- , CSS- . CSS- CSS. , link.

(document style sheets)

HTML- . embedded style sheet ( ).

CSS- style:

<style type=text/css>

...

</style>

style ( link) , < head >.

, (inline styles)

, style. , . style:

< pstyle = color: red >, </ p >

style HTML-. style CSS , , .

Inline-, , , . , .

CSS

CSS- ( ). ( , ) , . , css- .

HTML- css-. .

HTML

, html-, . html- :

<html>

<head>

<title>CSS</title>

<styletype="text/css">

p {text-align: center; color: red; background: yellow;

font-weight: bold; font-family: Courier}

</style>

</head>

<body>

<p>, HTML-</p>

</body>

</html>

- , HTML-, . . , html- , . :

<html>

<head>

<title>CSS</title>

<styletype="text/css">

.myclass {text-align: left; color: #D02090; background: #00FFFF;

font-weight: bold; font-family: Verdana; font-size: 120%}

</style>

</head>

<body>

<pclass="myclass">, </p>

</body>

</html>

ID ()

, HTML. ID , ID . #:

<html>

<head>

<title> CSS </title>

<styletype= " text / css " >

<-- id_p1 -->

#id_p1 {text-align: left; color: #D02090; background: #00FFFF;

font-weight: bold; font-family: Verdana; font-size: 120%}

<-- p id_p2 -->

p#id_p2 {text-indent: 60px; color: DarkGreen; background: #BEF781;

font-weight: bold; font-family: monospace; font-size: 120%;border: 2px outset red; padding: 1em;

text-transform: capitalize}

</style>

</head>

<body>

<pid= "id_p1" > , ID </p>

<pid= "id_p2" > , ID </p>

</body>

</html>

. .



<== | ==>
1. WEB- | ,
:


: 2018-10-15; !; : 340 |


:

:

, - , ; , - .
==> ...

741 - | 764 -


© 2015-2024 lektsii.org - -

: 0.029 .