Прохоренок Н.А. - HTML, JavaScript, PHP и MySQL. Джентльменский...

900
Íèêîëàé Ïðîõîðåíîê Ñàíêò-Ïåòåðáóðã «ÁÕÂ-Ïåòåðáóðã» 2010

Transcript of Прохоренок Н.А. - HTML, JavaScript, PHP и MySQL. Джентльменский...

- - 2010

681.3.06 32.973.26-018.2 84

. .84 HTML, JavaScript, PHP MySQL. Web-. 3- ., . . .: -, 2010. 912 .: . + ( CD-ROM) ( ) ISBN 978-5-9775-0540-6 Web- HTML, JavaScript, PHP MySQL. (CSS) Web-. PHP, , Web-. MySQL PHP, phpMyAdmin. Web- Apache. 3- Apache 2.2.14, PHP 5.3.0 MySQL 5.1.40. Notepad++, Aptana Studio, NetBeans HeidiSQL, Smarty, . - , , , Perl . Web- 681.3.06 32.973.26-018.2

: . . .

02429 24.07.00. 30.01.10. 701001/16. . . . . 73,53. 2500 . "-", 190005, -, ., 29. - 77.99.60.953..005770.05.09 26.05.2009 . . " "" 199034, -, 9 , 12

ISBN 978-5-9775-0540-6

. ., 2010 , "-", 2010

.......................................................................................................................1 1. HTML. ............................................5 1.1. ..............................................................................................5 1.2. HTML- ...................................................................................9 1.3. ........................................................................................12 1.3.1. HEAD. ...........................13 1.3.2. BODY. ...............................................15 1.4. ...........................................................16 1.4.1. ..................................................................17 1.4.2. ....................................................17 1.4.3. ............................................................18 1.5. ............................................................................19 1.5.1. ........................................................................................20 1.5.2. ..........................................................................................20 1.5.3. ...............................................................................21 1.5.4. ....................................................................................................22 1.5.5. ................................................................................22 1.6. ................................................................................................................23 1.6.1. .............................................................................23 1.6.2. ...............................................................................24 1.6.3. ..................................................................................26 1.7. ..............................................................................................................27 1.7.1. Web- ................................................................27 1.7.2. ..................................................................29 1.8. ......................................................................................................30 1.8.1. ...............................................................................30 1.8.2. ..........................................................................32 1.8.3. .............................................33 1.9. .............................................................................................................34 1.9.1. ....................................................................35 1.9.2. .....................................................................................36 1.9.3. .........................................................................................36 1.9.4. .........................................................................................37

IV

1.10. ............................................................................................................40 1.10.1. Web- .......................40 1.10.2. HTML-, ...........................44 1.10.3. ............................................................45 1.10.4. ...............................................................46 1.10.5. ........................................................................................47 1.10.6. .........................................47 1.10.7. . ....................48 1.11. - ........................................................................................50 1.11.1. - ............................................51 1.11.2. -..................................................................52 1.11.3. ................................................................................................53 1.11.4. -.............................53 1.12. ..............................................................................................................55 1.12.1. ...............................................55 1.12.2. ............................................................57 1.12.3. ..............................................................57 1.12.4. ............................................................59 1.12.5. ...............................................................................................64 1.12.6. ..............................................................67 1.13. . ..........................67 1.14. XHTML 1.0 HTML 4.01 .............................................................69 1.15. HTML- ........................73 1.16. Web- Internet Explorer.....................................74 2. CSS. WEB- .................................................................................................77 2.1. ............................................................................................77 2.2. ......................................................78 2.2.1. ......................................................78 2.2.2. HTML- ........78 2.2.3. .......................................83 2.2.4. .................................................................85 2.3. CSS...............................................................................87 2.4. .................................................................................88 2.4.1. ................................................................................................88 2.4.2. .............................................................................................89 2.4.3. ...........................................................................................89 2.4.4. ...............................................................................................89 2.4.5. ......................................................................................90

V

2.5. ....................................................................................90 2.5.1. ...................................................90 2.5.2. .......................................................................90 2.5.3. ................................................................................91 2.5.4. .............................................91 2.5.5. .....................................................91 2.5.6. .........................................................92 2.5.7. , .........................92 2.5.8. ..................................................................93 2.5.9. .......................................................93 2.6. .............................................................................................................94 2.6.1. .......................................................................................94 2.6.2. ..................................................................................95 2.7. ..................................................................................................................96 2.7.1. ....................................................................................96 2.7.2. ...............................................................................98 2.7.3. ......................................................................................98 2.7.4. ..............................................99 2.8. .....................................................................................................99 2.8.1. ....................................................................................................99 2.8.2. .....................................................................................100 2.8.3. .........................................................100 2.8.4. .................................................................100 2.8.5. ................................................................101 2.8.6. ..............................................101 2.9. ..............................................................................................................102 2.9.1. .................................................................................102 2.9.2. ...............................................102 2.9.3. ...........................................................103 2.10. ...................................................................................................103 2.11. . ......104 2.12. ..............................................................................106 2.12.1. ..............................................................................106 2.12.2. ...............................................................................108 2.12.3. overflow ....................................................................................109 2.12.4. ........................................................................111 2.12.5. ......................................................................113 2.12.6. .............................................115 2.13. ..........................................................117 2.14. CSS- ......................................119

VI

3. JAVASCRIPT. , ..............121 3.1. ..........................................................................................121 3.2. JavaScript ....................................................................121 3.3. JavaScript ..............................................................................124 3.4. ..............................124 3.4.1. OK ........................................................125 3.4.2. OK Cancel.......................................126 3.4.3. OK Cancel .......................................127 3.5. .....................................................................................................127 3.6. . ...............................................................128 3.7. JavaScript......................................................................................130 3.7.1. ....................................................................130 3.7.2. ........................................................................132 3.7.3. ...............................................................................132 3.7.4. ......................................................................133 3.7.5. .......................................................134 3.8. ......................................................................135 3.9. . .................................................................................................138 3.10. .........................................................................................................139 3.11. . ......................................142 3.11.1. .................................................................................142 3.11.2. HTML- .............................144 3.11.3. . ......................................................146 3.11.4. .................................................147 3.12. . ....................................................................................149 3.12.1. ............................................................................149 3.12.2. ifelse. ..............150 3.12.3. ? .............................................153 3.12.4. switch.........................................................................154 3.13. . ....................156 3.13.1. for ...................................................................................................156 3.13.2. while ...............................................................................................158 3.13.3. dowhile .......................................................................................159 3.13.4. continue. ...........160 3.13.5. break. .....................................................160

VII

3.14. ....................................................................................161 3.14.1. .......................................................................161 3.14.2. ...............................................................................162 3.14.3. ..............................................................162 3.14.4. .................................................................................163 3.14.5. Firebug Web- Firefox...........................................164 3.15. JavaScript .....................................................................167 3.15.1. .................................................................................167 3.15.2. Global ...........................................................................................168 3.15.3. Number. ..........................................................170 3.15.4. String. ..............................................................171 3.15.5. Array. .............................173 3.15.6. Math. .....................180 3.15.7. Date. . Web- ..................................................182 3.15.8. Function () .....................................................................186 3.15.9. Arguments. ..........................................................................................................187 3.15.10. RegExp. ..........................................................................................................188 3.16. .........................................................................................................199 3.16.1. .................................................................................199 3.16.2. .......................................................................................199 3.16.3. ..............................................................................200 3.16.4. ................................................................................200 3.16.5. ......................................................................................201 3.16.6. ...............................................................201 3.16.7. .............................................................................203 3.16.8. ...................................................205 3.16.9. .......................................................207 3.16.10. event. . ..................214 3.17. Microsoft Internet Explorer ............................................220 3.17.1. ...............................................................220 3.17.2. window. Web- ......................................................................................................221 3.17.3. . , ........................................................227 3.17.4. . ..............................................................231 3.17.5. . Web- .......................................234

VIII

3.17.6. navigator. Web- . Web- ........................................................................236 3.17.7. screen. .......................................................................................................241 3.17.8. location. URL- . HTML- ............................................242 3.17.9. history. . ..............................................................................................................247 3.17.10. document. HTML- ............................................................................................248 3.17.11. . ...............................................................255 3.17.12. . URL- . ..........................257 3.17.13. style. JavaScript.............................................................................................................265 3.17.14. selection. ........268 3.17.15. TextRange. . ...........272 3.17.16. . ...................................................................................................282 3.17.17. " " " ".....................................................................284 3.17.18. . cookies. cookies ..............................................................................................................285 3.18. ........................................................................289 3.18.1. ............................................................................290 3.18.2. Forms. ..................291 3.18.3. ......................................................................291 3.18.4. .........................................................................292 3.18.5. .......................................................................292 3.18.6. . E-mail . ....................292 3.18.7. . ..............................................................295 3.18.8. . . ............................298

IX

3.18.9. . ...............303 3.18.10. . . . .......................................................................................306 3.18.11. . .......................................................................................................309 3.19. ..........................................................................314 3.19.1. .................................................................................314 3.19.2. ..............................................................................................318 3.19.3. ................................................................................321 3.20. JavaScript-...................................................................................323 4. WEB-. WINDOWS ......................325 4.1. ..............................................................................325 4.2. Apache .............................................................................326 4.3. Apache............................................................333 4.4. httpd.conf ......................................................................334 4.4.1. ...................................................................................334 4.4.2. .................................................................335 4.4.3. . , http://localhost/~nik/ ....................................................337 4.4.4. .....................................339 4.4.5. ...............................340 4.4.6. .................................................................341 4.4.7. ..................................................................341 4.4.8. ...................................................................................342 4.4.9. MIME- ..........................................................................343 4.4.10. ..........................................................345 4.4.11. ..............................................................348 4.4.12. .htaccess. Apache ...............................................................................................350 4.4.13. ...................................................351 4.4.14. ............................................................................355 4.4.15. , ........................356 4.4.16. ..........................................................357 4.5. Apache .............................................................................360 4.6. PHP ................................................................................................362 4.7. MySQL...........................................................................................370

X

4.8. phpMyAdmin .................................................................................379 4.9. ...................................................................................385 4.9.1. ...................................................................................385 4.9.2. ....................................................................393 4.9.3. ................................................................393 4.9.4. ......................................................395 4.10. PHP Expert Editor ..................................................395 4.11. Aptana Studio .........................................................401 4.12. NetBeans.................................................................412 4.13. HeidiSQL....................................................................................418 5. PHP. WEB- ............421 5.1. ..........................................................................................421 5.2. PHP .............................................................................421 5.3. PHP- .....................................................................425 5.4. PHP- .....................................................................426 5.5. ..............................................................427 5.6. .....................................................................................................429 5.7. ...............................................429 5.8. ..........................................................431 5.9. ....................................................................................432 5.10. . ......................................433 5.11. PHP .............................................................................................434 5.11.1. ..................................................................435 5.11.2. ......................................................................436 5.11.3. .............................................................................436 5.11.4. . . .........................................................437 5.11.5. .....................................................440 5.12. ....................................................................441 5.13. .................................................................................443 5.14. .........................................................................................................444 5.14.1. ........................................................................444 5.14.2. . ..................................................444 5.14.3. ..........................................................................445 5.14.4. .......................................................................445 5.14.5. ..................................................................................447 5.14.6. ..................................................................447 5.14.7. ........................................451

XI

5.14.8. ......................................452 5.14.9. . ........453 5.14.10. ....................................................................455 5.14.11. ..............................................456 5.14.12. ............................................456 5.14.13. ..............................................................457 5.14.14. ......................................................458 5.14.15. ..............................................459 5.15. ............................................................................................................460 5.15.1. ........................................................460 5.15.2. ...................................................................................465 5.15.3. .......................................................466 5.15.4. ........................................................................466 5.15.5. ..............................................................467 5.15.6. ................................................................................468 5.15.7. ...................................................................469 5.15.8. . . ....................470 5.15.9. Perl- ..........................................478 5.15.10. UTF-8.....................487 5.15.11. .........................................................496 5.16. ...................................................................497 5.17. . , ..............................................................................499 5.18. . ......................................503 5.18.1. .................................................................................503 5.18.2. ........................................................505 5.18.3. require include. . .....................506 5.18.4. require_once include_once ...............................................509 5.18.5. . .........................................................510 5.18.6. . . .........510 5.18.7. ......................................................................514 5.18.8. . ................................................................................................515 5.19. . ....................................................................................516 5.19.1. ............................................................................516 5.19.2. ifelse. .............................................................................................................518

XII

5.19.3. ? .............................................520 5.19.4. switch. switch ifelse .....................................................................................................522 5.20. . ....................524 5.20.1. for ...................................................................................................524 5.20.2. while ...............................................................................................526 5.20.3. dowhile .......................................................................................526 5.20.4. foreach ...........................................................................................527 5.20.5. continue. ...........528 5.20.6. break. .....................................................529 5.21. . .................................................................................................529 5.22. ....................................................................................531 5.22.1. .......................................................................531 5.22.2. ...............................................................................532 5.22.3. ..............................................................532 5.22.4. .................................................................................532 5.22.5. or die() ................................................................................534 5.23. ...............................................................................534 5.23.1. $GLOBALS ................................................................................535 5.23.2. .....................................538 5.24. HTTP............................................................................................539 5.24.1. ..............................................................................542 5.24.2. . URL-. . . , ............................544 5.24.3. cookies. .....548 5.25. ...................................................................549 5.25.1. .................................................................................549 5.25.2. . , , ................................................................550 5.25.3. ..................................................................554 5.25.4. , E-mail- .............................................................555 5.25.5. CSV-. CSV- HTML- ................................................................................................560 5.25.6. UNIX ...................................562 5.25.7. ............................................564 5.25.8. ....................................................................566 5.25.9. . ..............................568 5.25.10. ........................................572

XIII

5.26. . E-mail- ..................................................................................................................583 5.27. PHP. .............587 5.28. .........................................................................................592 5.28.1. GD.................................592 5.28.2. ............................................593 5.28.3. ......................................................597 5.28.4. .............................................................599 5.28.5. ......................................................................................600 5.28.6. ......................................................................602 5.28.7. . ..............604 5.28.8. .............................609 5.29. ............................................................................612 5.29.1. , ...........................612 5.29.2. ...............................................613 5.29.3. ......................................................613 5.29.4. ....................................................................................................615 5.29.5. - ........................................................................616 5.29.6. Submit .........................................................................................616 5.29.7. . .......................................................................................................617 5.30. ...........................................................................622 5.30.1. ..............................................623 5.30.2. ........................................623 5.30.3. .........................................623 5.30.4. ...............................................................................624 5.30.5. .......625 5.30.6. , ....................................627 5.31. - .......................................627 5.31.1. .....................................................................................628 5.31.2. .....................................................................629 5.31.3. .........................................................................................631 5.31.4. ...........................................................633 5.31.5. ....................................................634 5.31.6. .........................................................634 5.31.7. .....................................637 5.32. Smarty...................................................................................639 5.32.1. ..........................................................................639 5.32.2. ..................................................................643 5.32.3. .................................................................649 5.32.4. ...........................................................................654

XIV

6. MYSQL. ..............................661 6.1. ..........................................................................................661 6.2. ...........................................................................661 6.3. ........................................................................................665 6.3.1. .........................................................................................666 6.3.2. .......................................................................................666 6.3.3. .............................................................................................667 6.4. SQL..........................................................................................668 6.4.1. ............................................................................668 6.4.2. .....................................................669 6.4.3. ....................................................................................671 6.4.4. ......................................................................674 6.4.5. ................................................................................677 6.4.6. ................................................................678 6.4.7. ...................................................................679 6.4.8. ..........................................................................................680 6.4.9. ....................................................682 6.4.10. . ........................................687 6.4.11. ........................................................692 6.5. PHP php_mysql.dll.......693 6.5.1. .............................................................................693 6.5.2. .................................................................................694 6.5.3. .......................................................694 6.5.4. ................................................................695 6.6. PHP php_mysqli.dll......702 6.6.1. .............................................................................702 6.6.2. .................................................................................704 6.6.3. .......................................................704 6.6.4. ................................................................706 6.7. MySQL .........................................................................................714 6.7.1. ....................................................................715 6.7.2. ...............................................................................717 6.7.3. ..............................................................................717 6.7.4. .......................................................719 6.7.5. ...............................................................720 6.8. ..........................................................................................721 6.9. ..................................................725 6.10. ..................................................................729 6.10.1. FULLTEXT...............................................................729 6.10.2. ....................................................731

XV

6.10.3. ...................................................................732 6.10.4. ..............................................................733 6.11. MySQL...........................................................................................733 6.11.1. ............................................................733 6.11.2. ......................................................................738 6.11.3. ..............................................................750 6.11.4. ..........................................................757 6.11.5. ...................................................................758 6.11.6. .....................................................................................760 6.12. SQL ..........................................................................................764 6.13. .....................................................................................765 6.14. .....................................................................................767 6.14.1. ......................768 6.14.2. WHERE .................770 6.15. .............................................................................................772 7. . ..........775 7.1. ...........................................................................................775 7.2. ................................................................................776 7.3. .................................................................................................779 7.4. Narod.ru ........................................................................780 7.4.1. .......................................................781 7.4.2. " "....................................................782 7.4.3. ...................................................................784 7.4.4. , ..................................786 7.5. .....................................................................791 7.5.1. ..........................................................................791 7.5.2. .......................................................792 7.5.3. .............................................................793 7.5.4. ..............796 7.5.5. Web- Apache .htaccess ..............804 7.5.6. favicon.ico........................................................................................806 7.5.7. Web- Apache............807 7.5.8. .....................................809 7.5.9. MySQL...............................................................812 7.5.10. phpMyAdmin.........................813 7.5.11. .........................................................................817 7.5.12. ....................................818 7.5.13. .........................820

XVI

7.6. ...............................................................................................823 7.6.1. ...............................................823 7.6.2. robots.txt ..........................................................................................824 7.6.3. ....................................................825 7.6.4. ........................................................827 7.6.5. Web- ........................................................827 7.7. ..............................................................................................828 7.7.1. .........................................................................828 7.7.2. ........................................................................................830 7.7.3. ................................................................................831 7.8. .............................................................................832 . - .....................................................835 .1. ...................................................................................................835 .1.1. HTML .......................................................................................................836 .1.2. ........................................................................844 .1.3. Flash ..........................................................................................................851 .1.4. PHP MySQL ..........................................................................................859 .1.5. ................................................................................................862 ....................................................................................869

, HTML, CSS, JavaScript, PHP MySQL, . (HTML, CSS, JavaScript), (PHP, MySQL). , , , . . Web-, . 7, . , HTML. - , . ? , . HTML, 1, Web- Web-. HTML , , , -, Web- , . (CSS), 2, Web. Web- Web- Web- . Web-, HTML CSS, , , . HTML JavaScript "" Web-, , , , .

2

JavaScript , Web- , , HTML- - , Web-, , Web- . , 3. , PHP. . ( , Web-), HTML-, Web-, , Web- . , PHP . PHP , , , , , , , , - . PHP 5. 4 , PHP. . , . , 4 , . . Web- , () MySQL. MySQL , , . MySQL 6. PHP MySQL, Microsoft SQL Server, Oracle, Sybase . MySQL, , .

3

7 , . , , FTP , Apache, , . . 7 Web- . - , Web- Internet Explorer, Perl. , - . , PHP, , Apache. . -. . . Web-. http://wwwadmin.ru/. E-mail [email protected]. , .

1

HTML. 1.1. HTML (HyperText Markup Language) , . - , , . . . , , . HTML :

, , , . . . "", . , () (). ("/") . , , ,
. ( ). -

6 ="".

1

, . :

tent-Type, 1251.

http-equiv Con content text/html; charset=windows . :

. , :

HTML , XHTML .

HTML- , Web-. Web- , , . HTML-, Web, Web-. HTML- Web , , , , . . , Web- HTML-. HTML html htm. HTML, FCKeditor tinyMCE. JavaScript Web-. FCKeditor http://ckeditor.com/download. sample07.html ( fckeditor\_samples\html\). Web- Firefox, :1. about:config .

HTML.

7

2. security.fileuri.strict_origin_policy

false. . 1.1 , FCKeditor, Web- Firefox. Microsoft Word, . FCKeditor , Word. HTML. HTML- (. 1.2). , HTML- . tinyMCE http://tinymce.moxiecode.com/ download.php. . http://tinymce.moxiecode.com/ download_i18n.php . tinymce\jscripts\tiny_mce\, . . , full.html ( tinymce\examples\) language: "ru",

tinyMCE.init({

. 1.1. FCKeditor, Web- Firefox

8

1

full.html Web-. . 1.3 , tinyMCE, Web- Firefox.

. 1.2. FCKeditor

. 1.3. tinyMCE, Web- Firefox

HTML.

9

1.2. HTML- HTML-. . . 1.1. 1.1. HTML-

HTML, , test.html. . "test.html", . , , , . . (*.txt), , txt.

Web-, , Internet Explorer. test.html. , Web- "

10

1

", " Microsoft Internet Explorer". Web ! Web-. HTML. : HTML-; Web-. HTML; . Web- HTML-, Web-, HTML-. HTML-, , HTML- . .

, , . . . .

Web-

( , ). Web Web-. : ; ; ; . " Web- Microsoft Internet Explorer".

HTML.

11

, - , . : , , , Web. , HTML-. HTML- , , .

Notepad++. windows-1251, UTF-8, HTML, JavaScript, PHP . . Notepad++ http://notepad-plus.sourceforge.net/ru/site.htm. (ZIP- ) , . Notepad++ . Notepad++. ANSI. , 1.1, . "test.html". , , , . Web. - , Windows Edit with Notepad++. Notepad++ PHP Expert Editor, Aptana Studio NetBeans. . Notepad++. 4.

12

1

1.3. , HTML-, , . HTML. 1.2 , HTML-. 1.2. HTML-

Web- . HTML 4.01:Strict . , . :

. HTML. :Transitional Frameset , . :

, Web- Internet Explorer (Quirks Mode).

HTML.

13

. Web- - Web-. W3C http://www.w3.org/TR/CSS2/ box.html http://www.quirksmode.org/css/quirksmode.html.

HTML- . HTML- ( ) ( ).

1.3.1. HEAD. HEAD , , , , . . HEAD . , , Web-. 60 , Web-:

, , . . - " ", " " . .

. , :

14

1

. lang :

, Web :

content :index

; ;

noindex

follow , Web-; nofollow all

;

index follow; noindex nofollow.

none

. :

, :

:

:

refresh :

30 . , URL- url:

HTML.

15

HEAD , , , . .

1.3.2. BODY. . , , . , Strict , , , .:

:bgcolor Web-. , .

. (, ) 00 FF. , "#", , #FF0000 , #00FF00 -, #FF00FF ( );background URL- ; alink link

; ;

; .

vlink text

, :

16

1

Transitional. Strict .

, .

1.4. , HTML . , , . , . , , (), HTML-. HTML-. , , .

, .

() >. HTML-:< >

();

HTML. &

17

(&); ; ("); (); ( ).

"

();

1.4.1. : : :, :, : : , Transitional. Strict .1.4.2. . , , 2: H2O18 1 . , , 2: 21.4.3. , . :face : , , . . . , ;size 1 7. , Web- , 3. 1 7, , , ( "+") ( "") : . , bgcolor (. . 1.3.2):color : : black white #000000 ; #FFFFFF ; #FFFF00 ; #C0C0C0 ;yellow silver HTML. 19 red #FF0000 ; #008000 ; #808080 -; #0000FF ; #000080 -; #800080 .green gray blue navypurple Transitional. Strict . . : : : 1.5. , , . . . Web- . : , ; ;;20 1 -; ; , ; .1.5.1. , , Web. , , , : . Web-.1.5.2.
. HTML- 1 2 3 Web- : "1 2 3". ,
:1
2
3
, , : HTML. 1 2 3 21 .1.5.3. . :size : . , Web-:width . :align center ( ): left : : right noshade : Transitional. Strict .22 11.5.4. : x 1 6. 1 : 6 : align, Web-. :center : left ( ): right : align Transitional. Strict .1.5.5. . Web- . . align, . :center : HTML. left23 ( ): : ( ): right justify align Transitional. Strict .1.6. , ( ) ( ). .1.6.1.
. . . 1.3 . 1.3. type, , . :disc :24 circle 1 : square : type Transitional. Strict .1.6.2. . . . 1.4 . 1.4. . type , . HTML. 25 :A : a : I : i : 1 ( ): start , : 26 1 value, : " " 1, " " 5, " " 6. type, start value Transitional. Strict .1.6.3. /. . , . . 1.5. 1.5. HTML (HyperText Markup Language) HTML. , CSS (Cascading Style Sheets) 271.7. Web- . . :GIF 256 . , GIF- ; JPEG . ; , . . GIF.PNG Web-. , .1.7.1. Web- Web- . , , , . :src URL- : 28 1 alt , , . , , alt, : width : : height width height . Web- . , . , . width height, Web- Web- . , Web-. Web- . Transitional:border : align Web-. :left , : HTML. 29 , :right top : : bottommiddle : hspace : vspace :1.7.2. background : bgcolor , , , , , .30 1 Transitional. Strict .1.8. . Web .1.8.1. HTML- . , , , . href. URL- Web-, . URL- "&", HTML- &: HTML- , , , . . Web , .URL- . HTML. 31 URL- URL- , IP , , . :http://www.mysite.ru/folder/file.html , :http://www.mysite.ru/file.html . Web, Web-:http://www.mysite.ru/ http://www.mysite.ru/folder/ URL- URL- Web-, . : Web- , Web, , URL- . Web-, http://www.mysite.ru/folder1/folder2/file1.html, http://www.mysite.ru/folder1/folder2/file2.html, : Web-, http://www.mysite.ru/ folder1/folder2/file1.html, http://www.mysite.ru/ folder1/folder2/folder3/file2.html, : Web-, http://www.mysite.ru/ folder1/folder2/file1.html, http://www.mysite.ru/ folder1/file2.html, : http://www.mysite.ru/folder1/folder2/folder3/file1.html http://www.mysite.ru/folder1/file2.html : 32 1 Web-. target _blank: target (. . 1.10.6). target Strict .1.8.2. Web-. , . href , URL-. #: 1 , href name, : "". "" . : 1.6. 1.6. HTML. 1 2 3 4 1 1 2 2 3 3 4 4 331.8.3. : URL- , "mailto:". . , E-mail .34 11.9. HTML- : ; , . , ( 1.7). 1.7. HTML- 1 2 3 4 22 . . 1 4. HTML- . , . .. , . . HTML. 351.9.1. :border , . : , , . 2. 0, :cellspacing cellpadding : 1;width : Transitional:align , . : , :left right , :center :36 bgcolor 1 : 1.9.2. . align. :top : : bottom align Transitional. Strict .1.9.3. . : . :align left ( ): : : : right center justify HTML. 37valign . : top : : : : middle bottom baseline bgcolor . Transitional. Strict .1.9.4. . :align width valign , ; height ;bgcolor ; width, height bgcolor Transitional. Strict .colspan rowspan ; . ( 1.7) 1 2 ( 1.8).38 1.8. 1 2 3 4 1, 11 2 2 . 1 3 ( 1.9). 1.9. 1 3 2 4 HTML. 39 11 3 3 . , . . . 1.10 . 1.10. 40 -2109 2008 -412 1978 11.10. Web- , HTML-.1.10.1. Web- , . , , . , , . Web- . 5 : doc1.html ( 1.11) Web-; doc2.html ( 1.12) ; chapter1.html ( 1.13) 1; HTML. 41chapter2.html ( 1.14) 2; test.html ( 1.15) HTML-, . 1.11. HTML-, (doc1.html) 1.12. HTML-, (doc2.html) 1 2 42 1 1.13. HTML-, 1 (chapter1.html) 1 1 1 1.14. HTML-, 2 (chapter2.html) 2 2 2 1.15. HTML-, (test.html) HTML. Web- 43 . Web- test.html. , . . () (). , . . Web-. , Web- : HTML-; Web-. HTML; , , . , . Web-, 44 1 HTML-. , test.html. HTML-, , HTML- . (doc1.html) , . HTML-. Web-. . , , . . , , , .1.10.2. HTML-, HTML- ( 1.16) . 1.16. HTML- HTML. Web- 45 HTML-, , HEAD . HTML- BODY, , , . , BODY , HTML- . , Frameset. : , . . Web- , , . .1.10.3. . , .46 1 :rows : : cols rows cols . . . ( ) :cols="20%, 80%" , (*), , :rows="100, *"1.10.4. . : URL- , . URL-:src name : scrolling . :auto , ( ): yes : no : HTML. 47marginwidth : marginheight : . :frameborder 1 ( ): : 0 noresize . . : 1.10.5. Web- , , . . : Web- 1.10.6. target . target ( name ) :_blank Web-: 48 1 _self , : _top : _parent , : chapter, : name : target Transitional.1.10.7. . HTML-. , . "". :src URL- , . URL-: name : scrolling . :auto , ( ): HTML. 49 yes : no : marginwidth marginheight ( ): frameborder . : 1 : : height : 0 width align . :left , : , :right top : : : middle bottom test.html ( 1.15) , 1.17.50 1.17. 1 Web- 1 2 , , . Transitional. Strict .1.11. - - . GIF JPG. HTML. 51 : Web- ; , ; .1.11.1. - test.html ( ) ( 1.18). 1.18. - - Web- 52 1 , . Web-, border 1. Web-. , , , 120240 ( ). . , , , " 2". chapter2.html . , " 1".1.11.2. - , - HTML- ( 1.19). 1.19. - HTML. 53 , - . Web-. usemap , . URL- . HTML-, , "#". , , . . , .1.11.3. . name. name usemap .1.11.4. - . . , . :shape . 4 :rect ( ): circle : poly : default . Internet Explorer: 54 1 coords . : rect ( ): x1 y1 , x2 y2 , : circle : x1 y1 , r1 , : poly : x1, y1, x2, y2, x3, y3 ( ). , , . : href URL- . : nohref , . : coords="60, 120, 60" alt="" HTML. 55 120240 60 ;alt : , . _blank, _top, _self _parent:target (. . 1.10.6). target Strict .1.12. Web. , , PHP. HTML .1.12.1. . , 1.20. 1.20. 56 1 :

:

URL- :

:

:

:
1 2 3
88*31:


forma.html Web-. Web- , (, , URL- , ), ( ), - HTML. 57 ( " 88*31:"), . . , , (URL- action , file.php), Web-. , , . , , , " ".1.12.2. HTML- . , , : .1.12.3. HTML-. :action URL- . : 58 1 method , Web. GET POST:GET URL "?" [ ]=[ ] = (&). :http://www.mysite.ru/file.php?pole1=Login&pole2=Password , , (, ), %nn, "+". , " " :%EA%E0%F2%E0%EB%EE%E3+%F1%E0%E9%F2%EE%E2 pole1, :http://www.mysite.ru/file.php?pole1= %EA%E0%F2%E0%EB%EE%E3+%F1%E0%E9%F2%EE%E2&pole2=Password GET method : GET , , URL-. 256 ; POST , (, ): MIME- . :enctypeapplication/x-www-form-urlencoded :multipart/form-data Web-: HTML. name 59 : target , , Web-. _blank, _top, _self _parent: . target Strict .1.12.4. , , , . :type . : text : password , : file . Web-: checkbox , : radio - ( ): 60 1reset , . , : submit , , : button : . , 3; hidden , . , , , ( ) : . (, pole) (, pole1). :name disabled . : . . :value : maxlength , : HTML. size61 : readonly , . : , :value , : hidden :value : - : , Web-, . , . , on:value checked, : checkbox . name. ( PHP): 1 2 362 1- - :value , Web-, : , ;checked , :- , . name value: :
: Web- . :name : cols : HTML. rows63 : : 1 2 :name : : size size 1; , . ( PHP):multiple , . :value , Web-, . , : 1 2 "1", select1="val1"64 1 "2", select1="2" selected, : 1 2 . label: BMW Opel Audi 1.12.5. . :for , . id : *: id . . HTML. 65 , for:*: accesskey . : *: Opera Firefox accesskey. ( 1.21), CSS . 1.21. body { /* */ font-size: 10pt; /* */ font-family: "Verdana", sans-serif; /* */ } label { /* label */ display: inline-block; /* */ width: 150px; /* */ vertical-align: top; /* */ }66 select { /* */ width: 250px; /* */ border: 1px solid black; /* */ } 1input.pole { /* input, pole */ width: 250px; /* */ border: 1px solid black; /* */ } textarea { /* */ width: 250px; /* */ height: 100px; /* */ border: 1px solid black; /* */ } form div { /* div, form */ margin-bottom: 20px; /* */ } *: *: *: *: . . *: HTML. *:67 : *: 1.12.6. . Web . . : . . 1.13. . . ( 1.22). , Web-. , , , .68 1.22.

1 div { /* DIV */ font-size: 12pt; /* */ color: green; /* */ font-family: "Arial"; /* */ border: 1px solid black; /* */ padding: 5px; /* */ } span { /* SPAN */ font-size: 12pt; /* */ color: red; /* */ font-family: "Arial"; /* */ font-weight: bold; /* */ } DIV SPAN HTML. 69 , , align. :center : left : : ( ): right justify align Transitional. Strict .1.14. XHTML 1.0 HTML 4.01XHTML (eXtensible HyperText Markup Language, ) Web-, XML. XHTML 1.0 HTML 4.01, XML 1.0. HTML 4.01 Web-, , . XHTML 1.0 . Web-, , . XHTML 1.0:Strict . , . : Transitional . HTML. : 70 1 Frameset , . : , XHTML xmlns: lang (lang="ru"). XML- , MIME application/xhtml+xml. Web- Internet Explorer . XML- , MIME- text/html. XHTML . . : : . :: (, selected), . : 1 2 HTML. 71: 1 2 . :: (, , ) (, , ). :: . : : (,
, .) (" /"). :
72 1:
HTML- (, "