Current location - Training Enrollment Network - Books and materials - Learn HTML+CSS from me.
Learn HTML+CSS from me.
Chapter 1 Basic concepts of HTML

1. 1 What is HTML 2?

The Development History of 1.2 HTML II

1.3 Simple HTML Example 3

1.4 Relationship between HTML and Web pages 4

1.5 What is used to develop HTML 5?

1.5. 1 title bar 5

1.5.2 Insert in column 5.

1.5.3 Document Toolbar 6

1.5.4 Example Exercise 6

1.6 Exercise 8 in this chapter

Grammatical basis of HTML 9

2. 1 HTML page structure 10

2.2 Writing of elements and attributes 12

2.2. Writing format of1element 12

2.2.2 Writing format of element attribute 12

Grammatical specification of HTML 14

2.3 file type 16

2.3. 1 What is the document type 16?

2.3.2 What kind of DOCTYPE 16 should I choose?

2.4 What is the namespace 17?

2.5 Exercise in this chapter 18

Chapter 3 Page Basic Elements 19

3. 1 page basic elements < html >;; 20

3. 1. 1 text display direction attribute dir 20

3. 1.2 specifies the language attribute lang 22

3.2 Header elements

3.3 Page Title Elements

3.4 yuan information element < meta >;; 24

3.4. 1 meta information element name attribute name 25

3.4.2 yuan Information Element Value Content 25

3.4. Additional attributes of ternary information elements

http-equiv 26

3.4.4 Setting Page Keyword 26

3.4.5 Set the main contents of page 27.

3.4.6 Define the search method on page 27.

3.4.7 Defining Page Jump 28

3.4.8 Define the author information on page 29.

3.4.9 Define the copyright information on page 30.

3.4. 10 defines the refresh time of page 30.

3.5 Basic setting elements

3.6 Creating Style Elements

3.6. 1 Type Attribute Type 33

3.6.2 Type Attribute Media 34

3.7 Link elements

3.7. 1 Specify the link path attribute href 36.

3.7.2 Type attribute of link type 36

3.7.3 Relational attributes rel and rev 37 of source document and target document

3.7.4 Link Style File 38

3.7.5 Making Favorite Icons 39

3.8 script elements

3.8. Language attribute of1scripting language 4 1

3.8.2 Type attribute of script type 42

3.8.3 Deferred execution attribute deferr42

3.8.4 Link attribute of script src 42

3.9 page body elements

3.9. 1 background attribute bgcolor 45 of the main element

3.9.2 Background image attribute of main element background 46

3.9.3 background picture scrolling attribute bgproperties 47 of the main element

3.9.4 Text attribute text 49 of main element

49 Left margin attribute in INIE browser leftmargin 49

3.9.6 topmargin 50, upper boundary attribute in IE browser.

3.9.7 Link attribute link 5 1

3.9.8 access link attribute vlink 52

3.9.9 Activate link attribute alink 53

3.9. 10 Use the style attribute style 54 in the main element.

3.9. 1 1 Call the style attribute class 55 in the body element.

3. 10 Use background music 55

3. 10. 1 IE Add background music elements < bgsound & gt 56 years old.

3. 10.2 path attribute of background music src 56

3. 10.3 Repetition property of background music loop 57

3. 1 1 Exercise 57 in this chapter

Chapter 4 text and paragraph content 59

4. 1 layer element < div >;; 60

4. 1. 1 tag attribute id 6 1

4. 1.2 calls the style attribute class 62

4. 1.3 Create Style Attribute Style 63

4. 1.4 alignment attribute align 64

4. 1.5 Cancel the word wrap attribute nowrap 66

4. 1.6 Title Attribute Title 66

4.2 Title Elements 67

4.3 Paragraph elements

4.4 Spacing and Layout of Text 70

4.4. 1 line feed element. 70

4.4.2 Seventy-two indented elements

Preserve format elements

4.4.4 Cancel line feed element 73

4.4.5 Reference element 74

4.4.6 Address Element 75

4.5 horizontal dividing line elements

4.5. 1 Height Attribute Size 77

4.5.2 style attribute noshade 78

Width Attribute Width 79

4.5.4 alignment attribute align 79

4.5.5 Color Attribute Color 80

4.6 Text elements based on physical style 8 1

4.6. 1 bold elements. 8 1

4.6.2 Amplifier 8 1

4.6.3 Shrinkage Element 82

Italic display element

Subscript element. 83

4.6.6 superscript element < sup > 85

4.7 Content-based Text Elements 85

4.7. 1 Emphasis element. 86

4.7.2 Bold emphasis elements

4.7.3 Extraction of elements 87

4.7.4 Acronym Element 87

4.7.5 Variable display elements. 87

Document reference elements

4.8 Exercise 89 in this chapter

Chapter 5 List Element 9 1

5. 1 unordered list elements; 92

5.2 Ordered list elements

5.2. 1 bullet type attribute type 96

5.2.2 Initial Value Attribute of Ordered List start 97

5.3 List entry elements

5.3. 1 Type attribute of bullet type 99

ItemNo. Attribute Value 100

5.4 Defining List Elements

5.4. 1 Define list item elements

5.4.2 Defining the Description Elements of List Entries

5.5 Practice in this chapter 104

Chapter VI Image Elements 105

6. 1 image element < img > 106

6. Path attribute of1.1image element src 107

6. 1.2 Replace the text attribute alt 108 of the picture.

6. Width attribute of1.3 image element width 109

6. 1.4 Height attribute of pixel height 1 10

6. 1.5 border attribute of image element +0 1 1

6. 1.6 Replace the long text attribute longdesc 1 12 of the picture.

6. 1.7 Upper and lower boundary attributes vspace 1 12

6. 1.8 Left and right margin attributes of image elements hspace 1 13

6. 1.9 Alignment attribute of image elements align 1 13

6. 1. 10 Image Server-side Mapping Attribute ismap 1 15

6. 1. 1 1 image server-side mapping attribute usemap 1 16

6.2 image format 1 16

6.2. 1 JPEG format 1 16

6.2.2 GIF format 1 17

6.2.3 PNG format 1 18

6.3 Exercise in this chapter 1 18

Chapter 7 Table Elements 12 1

7. 1 Structure of table elements 122

7. 1. 1 form

7. 1.2 line < tr >;; 124

7. 1.3 battery

7.2< Attribute of Table & gt Element 126

7.2. 1 border attribute border 126

7.2.2 Horizontal alignment attribute align 127

7.2.3 Height Attribute Height 128

7.2.4 Width Attribute Width 129

7.2.5 border color attribute bordercolor 129

7.2.6 bordercolordark 130, the attribute of the dark border of the border.

7.2.7 border color light131,the attribute of bright border.

7.2.8 background color attribute bgcolor 132

7.2.9 Background Image Attribute Background 133

7.2. 10 cell spacing attribute cell spacing 133

7.2. 1 1 Cell Blanking Attribute Cell Add 135

7.2. 12 table cell border attribute rules 136

7.2. 13 table border property box 136

7.3 Attribute of & lttr & gt element 138

7.3. 1 horizontal alignment attribute align 138

7.3.2 Vertical linear attribute valign 139

7.3.3 background color attribute bgcolor 140

7.3.4 border color attribute bordercolor 14 1

7.3.5 bordercolordark 142, the attribute of the dark border of the border.

7.3.6 border color light142, the attribute of bright border.

7.4 Attribute of & lttd & gt element 143

7.4. 1 width attribute width 143

7.4.2 Height Attribute Height 145

7.4.3 background color attribute bgcolor 146

7.4.4 Background Image Attribute Background 147

7.4.5 Horizontal alignment attribute align 148

7.4.6 Vertical alignment attribute valign 149

7.4.7 border attribute bordercolor 150

7.4.8 Merge column attribute colspan 15 1

7.4.9 Merge line attribute rowspan 152

7.4. 10 Peer Display Attribute nowrap 153

7.5 Other elements used in table 155

Table title element; 155

7.5.2 Header Element 156

7.5.3 Header Line Elements

7.5.4 Table main elements. 159

Table end element

7.6 Practice in this chapter 16 1

Chapter 8 Link Elements 165

8. 1 links and paths 166

8. Concept of1.1hyperlink 166

8. 1.2 path url 167

8. 1.3 HTTP path 168

8. 1.4 FTP path 169

8. 1.5 mail path 169

8.2 Link elements

8.2. 1 Specify the path attribute href 172.

8.2.2 Display the link target attribute target 173.

8.2.3 Activation sequence attribute tabindex 174

8.2.4 Hotkey attribute of link access key 175.

8.3 picture link 176

8.3. 1 Create Link Area Element

8.3.2 Name attribute of link area name 176

8.3.3 Define mouse sensitive area elements

8.3.4 The path attributes of the link are href and nohref 178.

8.3.5 Text description attribute of link alt 179.

8.3.6 Coordinate attribute of mouse sensitive area coords 179

8.3.7 Shape attribute of mouse sensitive area shape 18 1

8.3.8 Use the link 18 1 in the picture.

8.4 Practice in this chapter 182

Chapter 9 Table Elements 183

9. 1 form element < Form >;; 184

9. 1. 1 action attribute action 184

9. 1.2 data sending method attribute method 185

9. 1.3 Name Attribute Name 187

9.2 Form control

9.2. 1 text field text 187

9.2.2 Password in password area 188

9.2.3 Submit button Submit 189

9.2.4 Reset button reset 190

9.2.5 image button image 19 1

Click the button 192.

9.2.7 checkbox checkbox 192

9.2.8 radio button radio 193

9.2.9 Hidden area 194

9.3< Enter the attribute of> element 195.

9.3. 1 read-only property195

9.3.2 Disable unavailable attribute 196

9.4 Select List Entry Elements

9.5 Button element

9.6 Select list elements

Height attribute size 200

9.6.2 Multi-choice attribute multiple 20 1

9.7 Text Area Elements

Width attribute column 202

9.7.2 Height Attribute Line 202

9.8 Form Markup Elements

9.8. 1 defines the target attribute for 203.

9.8.2 Define hotkey attribute access key 204.

9.9 Exercise 205 in this chapter

Chapter 10 Frame Element 209

10. 1 frameset element 2 10

10. 1. 1 line attribute line 2 1 1

10. 1.2 column attribute cols 2 12

10. 1.3 border attribute frameborder 2 14

10. 1.4 border width attribute frame spacing 2 15

10. 1.5 border width attribute border 2 16

10. 1.6 color attribute border color 2 17

10.2 framework elements

The path attribute of the content is SRC2 10.2. 18.

10.2.2 scroll attribute scroll 2 19

10.2.3 fixed dimension attribute noresize 220

10.2.4 Location attributes of display content: marginheight and Marginwid22 1.

10.2.5 border properties frame border 223

Frame element

10.4 embedded framework elements

Links in 10.5 frame elements 225

10.6 Exercise 227 in this chapter

Chapter 1 1 Concept of CSS 23 1

What is11.1CSS 232?

11.2 Relationship between CSS and Web Page Display Effect 233

How to use 1 1.3 CSS 235

1 1.3. 1 element directly adds style 235.

From the header

1 1.3.3 calls 237 through the link.

1 1.4 Exercise 238 in this chapter

Syntax of chapter 12 CSS 24 1

12. 1 selector 242

12. 1. 1 id selector 242

12. 1.2 category selector 243

12. 1.3 type selector 244

12. 1.4 Pseudoclass 245

12. 1.5 sub-selector 246

12. 1.6 selector grouping 248

12. 1.7 priority of selector 248

12.2 Attribute 250

12.3 value 25 1

1 color value 252

12.3.2 Length value 253

12.3.3 Percentage value 253

12.4 Inheritance value 254

12.5 Default value 255

12.6 block elements and in-line elements 257

12.6. 1 block element 257

12.6.2 inline element 258

12.7 Apply Style Priority 259

12.8 Exercise 262 in this chapter

Chapter 13 CSS control text display 263

13. 1 controls the display of font 264.

13. 1. 1 font selection attribute font family 264

13. 1.2 font color attribute color 265

13.10.3 font size attribute font size 266

13. 1.4 font style attributes font style 269

13. 1.5 font bold attribute font thickness 270

13. 1.6 font decoration attribute text-decoration 27 1

13. 1.7 font underline position attribute text-underline-position 273

13. 1.8 lowercase letter attribute font -variant 274

13. 1.9 Convert case attribute text-Convert 276

13. 1. 10 letter spacing attribute letter spacing 277

13.1.11kerning278

13. 1. 12 line height attribute line height 279

13. 1. 13 font comprehensive properties font 28 1

13.2 Control the display of text 282

13. 2. 1 Text-Indet282.

13.2.2 whitespace 283, a text whitespace attribute.

13.2.3 Text Overflow Attribute Text Overflow 285

13.2.4 horizontal alignment attribute text-align 287

13.2.5 Vertical Alignment Attribute Vertical Alignment 288

13.2.6 Text Stream Attribute Layout-Stream 29 1

13.2.7 Text Direction Attribute Direction 292

13.2.8 text sorting attribute unicode-bidi 293

13.2.9 Hyphenation attribute Hyphenation 295

13. 2. 65438+ word wrap 296, a text delimiter attribute.

13.3 Exercise 298 in this chapter

Chapter 14 Display of CSS Control List Elements 30 1

14. 1 controls the display of list element 302.

14. 1. 1 list symbol attribute ist-style-type 302

14. 1.2 mixed list symbol 304

14. 1.3 list image list style image 305

14. 1.4 Display position of list image 307

14. 1.5 Label Location Attribute List-Style-Location 308

14. 1.6 Label Location Attribute and List Height 309

14. 1.7 List Comprehensive Attribute List Style 3 10

14.2 Use and Nesting of List Elements

The default attribute value of 14.2. 1 list element is 3 1 1.

14.2.2 Boundary and filling of unified list elements 3 12

14.3 Exercise 3 in this chapter13

CSS controls the display of table elements.

15. 1 Control the display of table element 3 16.

15. 1. 1 border merging attribute boder-collapse 3 16

15. 1.2 table border spacing attribute border spacing 3 17

15. 1.3 Table Title Location Attribute Title -side 3 19

15. 1.4 table layout properties table layout 32 1

15.2 cell constraint 323

Determine the width or height of a single line or column 323

15.2.2 Determine the width or height of multiple rows or columns 325

15.2.3 cells and nesting

15.3 Exercise 328 in this chapter

Chapter 16 CSS control element size 33 1

16. 1 concept box model 332

16.2 Size of element content

16.2. 1 width attribute width 333

16.2.2 Height Attribute Height 334

16.2.3 Relationship between content and width and height attributes 334

16.3 background of element 335

16.3. 1 background color attribute background color 336

16.3.2 background image properties background image 337

16.3.3 background image attribute repetition-repetition 337

16.3.4 Background-Location attribute of background picture 339

16.3.5 background-attachment 340, scrolling attribute of background picture

16.3.6 Use both background color and background picture attribute 34 1

16.3.7 background comprehensive attribute 342

16.4 blanking of components 343

16.4. 1 Top Fill Attribute Fill-Top 344

16.4.2 right padding attribute 344

16.4.3 Underfill-Bottom Attribute 345

16.4.4 left padding attribute left padding 346

16.4.5 comprehensive filling attribute filling 347

16.4.6 blanking and background 348

16.5 border of element 349

16.5. 1 top border style attribute border-top-style 349

16.5.2 border-right-style 35 1

16.5.3 bottom border style attribute border-bottom-style 352

16.5.4 left border style attribute border-left-style 354

16.5.5 top border color attribute border-top-color 355

16.5.6 border-right-color 356, the color attribute of the right border.

16.5.7 bottom border color attribute border-bottom-color 357

16.5.8 Color attribute of left border border-left-color 358

16.5.9 border-top-width 359, the upper border width attribute.

16.5. 10 right border width attribute border-right-width 360

16. 5. 1 1 border-bottom-width 36 1

16.5. 12 left boundary width attribute border-left-width 362

16.5. 13 border style attribute border style 363

16.5. 14 border color attribute border color 364

16.5. 15 border width attribute border width 365

16.5. 16 border -top 366, the comprehensive attribute of the top of the border.

16.5. 17 border-right 367, the comprehensive properties of the right side of the border.

16.5. 18 border order bottom comprehensive properties-bottom 368

16.5. 19 border-left 368, the comprehensive attribute of the left side of the border.

16.5.20 border comprehensive attribute border 368

16.6 boundary of element 369

16.6. 1 top boundary attribute margin-top 369

16.6.2 right boundary attribute margin-right 370

16.6.3 bottom boundary attribute margin-bottom 372

16.6.4 left boundary attribute margin-left 373

16.6.5 Boundary comprehensive attribute margin 374

16.6.6 boundary and background

16.7 Size and distance of nested elements 376

16.7. 1 parent-child element 376

16.7.2 uses the boundary attribute in the child element, and the parent element has no defined size of 377.

16.7.3 boundary attribute is used for child elements, and filling attribute 378 is used for parent elements.

16.8 Exercise 379 in this chapter

Chapter 17 Positioning of CSS Control Elements 38 1

17. 1 element position 382

17. 1. 1 Location attribute of the element: location 382.

Offset attribute top 383 on 17. 1.2

17. 1.3 Right Offset Attribute Right 384

17. 1.4 bottom offset attribute bottom 385

17. 1.5 left offset attribute left 386

17.2 absolute positioning 387

17.2. 1 absolute positioning and parent element 388

17.2.2 Absolute positioning and adjacent elements 389

17.3 relative positioning 390

Determination of the position of the relative positioning element 390

17.3.2 Relative positioning and adjacent elements 39 1

17.4 positioning element overlap 393

17.5 Exercise 394 in this chapter

Chapter 18 Layout of CSS control elements 397

18. 1 element floating 398

Floating attribute float 398 of18.1.1element

18. 1.2 floating element and fixed element 399

18. 1.3 two floating elements display effect 400.

18. 1.4 Display order of multiple floating elements 40 1

18.2 floating clearing 403

18.2. 1 Clear Floating Attribute Clear 403

18.2.2 Clear floating and fixed elements 404

18.3 Content cutting 405

18.3. 1 Clip Properties Clip 405

18.3.2 cutting characteristics and contents 407

18.4 control of overflow content 408

18.4. 1 Overflow Attribute Overflow 409

18.4.2 lateral overflow attribute overflow -x 4 10

18.4.3 vertical overflow attribute overflow -y 4 1 1

18.4.4 Scroll bar and border 4 12

18.5 display mode of element 4 13

18.5. 1 display mode attribute display 4 13

18.5.2 Exception in displaying embedded block attribute value 4 15

18.5.3 Hidden attribute value is not 4 16.

18.6 Visibility of Element 4 18

18. 6. 1 visual attribute visibility 4 18

18.6.2 Relationship between visibility attribute and display mode attribute 4 19

18.7 Exercise 42 in this chapter1

CSS controls the display of other elements 423

19. 1 control the display of the wheel 424.

19. 1. 1 scroll bar -3d light-color424, color attribute of 3d bright border of scroll bar.

19.1.2 scrollbar-highlight-color425, the color attribute of the bright border of the scroll bar.

19. 1.3 Scroll bar-surface-color 426, color attribute of scroll bar slider.

19. 1.4 Scroll bar-arrow-color 428, color attribute of scroll bar arrow.

19. 1.5 Scroll bar-shadow-color 429, color attribute of scroll bar shadow.

19. 1.6 scroll bar-dark shadow-color 430, shadow attribute of scroll bar.

19.1.7 scrollbar-track-color431,the color attribute of the scroll bar drag area.

19.1.8 scrollbar-base-color432, the reference color attribute of the scroll bar.

19. 1.9 defines the color of the wheel 433.

19.2 control cursor display 434

19.3 Scaling of control elements 437

19.4 Control the display of links 438

19.4. 1 defines the display effect of 438 when the link has not been visited.

19.4.2 defines the display effect of the linked mouse hover 439.

19.4.3 defines the display effect of link activation 440.

19.4.4 defines the display effect after the link accesses 44 1

19.4.5 defines the order of linking effects.

19.5 Exercise 444 in this chapter

Chapter 20 Making a Personal Blog Page 447

20. 1 Preparation before page making 448

20. 1. 1 Planning Contents Page 448

20. 1.2 segmentation effect diagram 449

20.2 Planning site folder 449

20.3 Defining Basic Styles 450

Create a new CSS file 450

20.3.2 Define the basic style of the page 450

20.4 making header 45 1

20.4. 1 Making header structure 45 1

20.4.2 Define the style of header 45 1.

20.5 Making Page Navigation 453

20.5. 1 Making page navigation structure 453

20.5.2 Defining the Style of Page Navigation 454

20.6 Making Page Text 456

20.6. 1 structure of page body 456

20.6.2 Define the style of the main content of the page 456

20.7 Making a Log 457

20.7. 1 structure of making log contents 458

20.7.2 Defining the Style of Log Content 458

20.8 Making Sidebars 459

20.8. 1 Make the structure of toolbar 459

20.8.2 Define the general style of sidebar 46 1.

20.9 Make the bottom content of the page 462

20.9. 1 Make the structure at the bottom of page 463.

20.9.2 Defining the Style at the Bottom of the Page 463