COPYRIGHTED MATERIAL. Contents. Introduction. Chapter 1: Structuring Documents for the Web 1

Similar documents
COPYRIGHTED MATERIAL. Contents. Chapter 1: Creating Structured Documents 1

HTML TAG SUMMARY HTML REFERENCE 18 TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES MOST TAGS

Index. CSS directive, # (octothorpe), intrapage links, 26

Deccansoft Software Services

Beginning Web Programming with HTML, XHTML, and CSS. Second Edition. Jon Duckett

Certified HTML Designer VS-1027

The [HTML] Element p. 61 The [HEAD] Element p. 62 The [TITLE] Element p. 63 The [BODY] Element p. 66 HTML Elements p. 66 Core Attributes p.

Certified HTML5 Developer VS-1029

Website Development with HTML5, CSS and Bootstrap

Oliver Pott HTML XML. new reference. Markt+Technik Verlag

HTML and CSS COURSE SYLLABUS

1/6/ :28 AM Approved New Course (First Version) CS 50A Course Outline as of Fall 2014

SUB Gfittingen A nd Editi S«BEX- SAN FRANCISCO PARIS DUSSELDORF SOEST LONDON

Table of Contents. MySource Matrix Content Types Manual

QUICK REFERENCE GUIDE

Chapter 1 Self Test. LATIHAN BAB 1. tjetjeprb{at}gmail{dot}com. webdesign/favorites.html :// / / / that houses that information. structure?

Name Related Elements Type Default Depr. DTD Comment

1.7 Uniform Resource Identifiers and Domain Names 13 URIs and URLs 13 Domain Names 13

Beginning Web Programming with HTML, XHTML, and CSS. Second Edition. Jon Duckett

Duke Library Website Preliminary Accessibility Assessment

HTML & CSS. SWE 432, Fall 2017 Design and Implementation of Software for the Web

HTML: Parsing Library

NEW WEBMASTER HTML & CSS FOR BEGINNERS COURSE SYNOPSIS

Creating HTML files using Notepad

Chapter 1 Getting Started with HTML 5 1. Chapter 2 Introduction to New Elements in HTML 5 21

Website Design (Weekday) By Alabian Solutions Ltd , 2016

Symbols INDEX. !important rule, rule, , 146, , rule,

This course is designed for web developers that want to learn HTML5, CSS3, JavaScript and jquery.

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0

Website Design (Weekend) By Alabian Solutions Ltd , 2016

THIRD EDITION. CSS Cookbook. Christopher Schmitt foreword by Dan Cederholm O'REILLY 8. Beijing Cambridge Farnham Koln Sebastopol Taipei Tokyo

Creating Web Pages with HTML-Level III Tutorials HTML 6.01

Chapter 1 Introduction to Dreamweaver CS3 1. About Dreamweaver CS3 Interface...4. Creating New Webpages...10

HTML Summary. All of the following are containers. Structure. Italics Bold. Line Break. Horizontal Rule. Non-break (hard) space.

HTML: Parsing Library

CSC Web Programming. Introduction to HTML

Table Basics. The structure of an table

As we design and build out our HTML pages, there are some basics that we may follow for each page, site, and application.

Introduction to the Internet and World Wide Web p. 1 The Evolution of the Internet p. 2 The Internet, Intranets, and Extranets p. 3 The Evolution of

Web Development IB PRECISION EXAMS

GRAPHIC WEB DESIGNER PROGRAM

Course Outline Advanced Web Design

Index. alt, 38, 57 class, 86, 88, 101, 107 href, 24, 51, 57 id, 86 88, 98 overview, 37. src, 37, 57. backend, WordPress, 146, 148

Bixby Public Schools Course Essential Elements Grade: Desktop Publishing

CSS THE M\SS1NG MANUAL. David Sawyer McFarland. POGUE PRESS" O'REILLr Beijing Cambridge Farnham Köln Paris Sebastopol Taipei Tokyo

Html basics Course Outline

The figure below shows the Dreamweaver Interface.

Ministry of Higher Education and Scientific Research

Dreamweaver Basics. Planning your website Organize site structure Plan site design & navigation Gather your assets

Text and Layout. Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 11. This presentation 2004, MacAvon Media Productions

Chapter 3 Style Sheets: CSS

CSI 3140 WWW Structures, Techniques and Standards. Markup Languages: XHTML 1.0

HTML Markup for Accessibility You Never Knew About

Mobile MOUSe WEB SITE DESIGN ONLINE COURSE OUTLINE

Canvas & Brush Reference. Source: stock.xchng, Maarten Uilenbroek

1.264 Lecture 12. HTML Introduction to FrontPage

Tutorial 2 - HTML basics

Index LICENSED PRODUCT NOT FOR RESALE

Course Outline Advanced Web Design

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1

Study Guide 2 - HTML and CSS - Chap. 6,8,10,11,12 Name - Alexia Bernardo

HTML CS 4640 Programming Languages for Web Applications

UNIT II Dynamic HTML and web designing

WEBSITE PROJECT 2 PURPOSE: INSTRUCTIONS: REQUIREMENTS:

13.8 How to specify alternate text

Web Engineering CSS. By Assistant Prof Malik M Ali

Static Webpage Development

Review of HTML. Chapter Pearson. Fundamentals of Web Development. Randy Connolly and Ricardo Hoar

Certified CSS Designer VS-1028

NAME: name a section of the page TARGET = "_blank" "_parent" "_self" "_top" window name which window the document should go in

Web Designing HTML5 NOTES

Wireframe :: tistory wireframe tistory.

Basics of Web Technologies

Creating Web Pages with SeaMonkey Composer

Kurdistan Regional Government Iraq Ministry of Higher Education and Scientific Research, Duhok Polytechnic University

Go.Web Style Guide. Oct. 16, Hackensack Ave Hackensack, NJ GoAmerica, Inc. All rights reserved.

@namespace url( /* set default namespace to HTML */ /* bidi */

Chapter 2:- Introduction to XHTML. Compiled By:- Sanjay Patel Assistant Professor, SVBIT.

Summary 4/5. (contains info about the html)

Objectives. Tutorial 8 Designing ga Web Site with Frames. Introducing Frames. Objectives. Disadvantages to Using Frames. Planning Your Frames

Cascading Style Sheet

ROLE OF WEB BROWSING LAYOUT ENGINE EVALUATION IN DEVELOPMENT

Programmazione Web a.a. 2017/2018 HTML5

Varargs Training & Software Development Centre Private Limited, Module: HTML5, CSS3 & JavaScript

COPYRIGHTED MATERIAL. Contents. Chapter 1: Introducing Microsoft Expression Web 1. Chapter 2: Building a Web Page 21. Acknowledgments Introduction

Appendix A. XHTML 1.1 Module Reference

core-css.book Page i Sunday, January 9, :18 PM CORE CSS

the missing manual0 O'REILLY Third Edition David Sawyer McFarland Beijing Cambridge The book that should have been in the box Farnham

Web Design & Dev. Combo. By Alabian Solutions Ltd , 2016

Indian Institute of Technology Kharagpur. HTML Part III. Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. I.I.T.

CompuScholar, Inc. Alignment to Utah's Web Development I Standards

HTML BEGINNING TAGS. HTML Structure <html> <head> <title> </title> </head> <body> Web page content </body> </html>

Web Designing Course

Appendix D CSS Properties and Values

Web Site Development with HTML/JavaScrip

"utf-8";

Web development using PHP & MySQL with HTML5, CSS, JavaScript

Frontend guide. Everything you need to know about HTML, CSS, JavaScript and DOM. Dejan V Čančarević

ver Wfl Adobe lif Sams Teach Yourself Betsy Bruce Robyn Ness SAMS 800 East 96th Street, Indianapolis, Indiana, USA WlM John Ray ^lg^

Table of Contents Introduction... xxxv PART I: HTML5 Chapter 1: Overview of HTML5 and Other Web Technologies... 1

Transcription:

Introduction Chapter 1: Structuring Documents for the Web 1 A Web of Structured Documents 1 Introducing HTML and XHTML 2 Tags and Elements 4 Separating Heads from Bodies 5 Attributes Tell Us About Elements 7 Learning from Others by Viewing Their Source Code 8 Elements for Marking Up Text 9 Basic Text Formatting 10 White Space and Flow 10 Creating Headings Using <hn> Elements 11 The align Attribute (Deprecated) 13 Creating Paragraphs Using the <p> Element 15 Creating Line Breaks Using the <br /> Element 15 Creating Preformatted Text Using the <pre> Element 16 Presentational Elements 19 The <b>element 20 The <i>element 20 The <u>element (Deprecated) 21 The <s> and <strike> Elements (Deprecated) 21 The <tt> Element 21 The <sup> Element 22 The <sub> Element 22 The <big> Element 22 The <small> Element 22 The <hr /> Element 23 Phrase Elements 23 The <em> Element Adds Emphasis 24 The <strong> Element Adds Strong Emphasis 24 The <address> Element Is for Addresses 24 The <abbr> Element Is for Abbreviations 25 The <acronym> Element Is for Acronym Use 25 The <dfn> Element Is for Special Terms 26 COPYRIGHTED MATERIAL xxi

The <blockquote> Element Is for Quoting Text 26 Using the cite Attribute with the <blockquote> Element 27 The <q> Element Is for Short Quotations 27 The <cite> Element Is for Citations 27 The <code> Element Is for Code 28 The <kbd> Element Is for Text Typed on a Keyboard 29 The <var> Element Is for Programming Variables 30 The <samp> Element Is for a Program Output 30 Lists 30 Using the <ul> Element to Create Unordered Lists 31 Ordered Lists 31 Definition Lists 33 Nesting Lists 34 Editing Text 38 Using Character Entities for Special Characters 39 Comments 40 The <font> Element (Deprecated) 40 Understanding Block and Inline Elements 41 Grouping Elements with <div> and <span> 42 The XML Declaration 43 Document Type Declaration 43 Core Elements and Attributes 45 The <html> Element 45 The <head> Element 45 The <title> Element 46 The <body> Element 47 Attribute Groups 47 Core Attributes 47 Internationalization 49 UI Events 51 Summary 51 Exercises 52 Chapter 2: Links and Navigation 55 Basic Links 55 Linking to Other Web Pages 56 Linking to E-mail Addresses 58 Understanding Directories and Directory Structures 61 Understanding URLs 62 Absolute and Relative URLs 63 The <base> Element 66 viii

Creating Links with the <a> Element 66 Creating a Source Anchor with the href Attribute 66 Creating a Destination Anchor Using the name and id Attributes (Linking to a Specific Part of a Page) 67 The <a> Element s Other Attributes 70 Advanced E-mail Links 76 Summary 78 Exercises 78 Chapter 3: Images, Audio, and Video 79 Adding Images Using the <img> Element 79 The src Attribute 80 The alt Attribute 80 The height and width Attributes 81 The align Attribute (Deprecated) 83 The border Attribute (Deprecated) 84 The hspace and vspace Attributes (Deprecated) 84 The ismap and usemap Attributes 85 The longdesc Attribute 85 The name Attribute (Deprecated) 86 Using Images as Links 88 Image Maps 89 Client-Side Image Maps 90 Server-Side Image Maps 94 Choosing the Right Image Format 95 GIF Images 97 Animated GIFs 100 JPEG Images 101 PNG Images 102 Keeping File Sizes Small 102 Adding Flash, Video, and Audio to Your Web Pages 104 Adding Flash Movies to Your Site 106 Adding Videos to Your Site 113 Adding Videos Using Flash Video 115 Video Size 117 Adding Audio to Your Site 118 Automatically Playing Audio and Video When a Page Loads 123 A Closer Look at the <object> and <param> Elements 123 The <param> Element 126 Summary 127 Exercises 128 ix

Chapter 4: Tables 131 Introducing Tables 131 Basic Table Elements and Attributes 139 The <table> Element Creates a Table 139 The <tr> Element Contains Table Rows 144 The <td> and <th> Elements Represent Table Cells 146 Adding a <caption> to a Table 151 Grouping Sections of a Table 151 Spanning Columns Using the colspan Attribute 151 Spanning Rows Using the rowspan Attribute 153 Splitting Up Tables Using a Head, Body, and Foot 154 Grouping Columns Using the <colgroup> Element 157 Columns Sharing Styles Using the <col> Element 158 Nested Tables 158 Accessible Tables 160 How to Linearize Tables 160 Using the id, scope, and headers Attributes 161 Summary 164 Exercises 165 Chapter 5: Forms 167 Introducing Forms 168 Creating a Form with the <form> Element 171 The action Attribute 171 The method Attribute 172 The id Attribute 172 The name Attribute (Deprecated) 172 The onsubmit Attribute 172 The onreset Attribute 173 The enctype Attribute 173 The accept-charset Attribute 174 The accept Attribute 174 The target Attribute 174 White Space and the <form> Element 174 Form Controls 175 Text Inputs 175 Buttons 180 Checkboxes 183 Radio Buttons 185 x

Select Boxes 187 File Select Boxes 193 Hidden Controls 194 Object Controls 195 Creating Labels for Controls and the <label> Element 198 Structuring Your Forms with <fieldset> and <legend> Elements 200 Focus 202 Tabbing Order 202 Access Keys 204 Disabled and Read-Only Controls 205 Sending Form Data to the Server 207 HT TP get 207 HT TP post 208 Summary 211 Exercises 212 Chapter 6: Frames 215 Introducing the Frameset 216 When To Use Frames 218 The <frameset> Element 219 The cols Attribute 220 The rows Attribute 222 Browser-Specific Extensions to the <frameset> Element 222 The <frame> Element 225 The src Attribute 225 The name Attribute 226 The frameborder Attribute 226 The marginwidth and marginheight Attributes 226 The noresize Attribute 227 The scrolling Attribute 227 The longdesc Attribute 227 The <noframes> Element 228 Creating Links Between Frames 228 Setting a Default Target Frame Using the <base> Element 230 Nested Framesets 231 Inline or Floating Frames with <iframe> 234 The <iframe> Element 235 Summary 240 Exercises 240 xi

Chapter 7: Cascading Style Sheets 243 Introducing CSS 244 A Basic Example 245 Inheritance 249 Where You Can Add CSS Rules 250 The <link> Element 250 The <style> Element 252 Advantages of External CSS Style Sheets 253 CSS Properties 254 Controlling Text 255 The font-family Property 257 The font-size Property 259 The font-weight Property 261 The font-style Property 262 The font-variant Property 262 The font-stretch Property 263 The font-size-adjust Property 263 Text Formatting 264 The color Property 264 The text-align Property 265 The vertical-align Property 266 The text-decoration Property 267 The text-indent Property 268 The text-shadow Property 269 The text-transform Property 269 The letter-spacing Property 270 The word-spacing Property 271 The white-space Property 271 The direction Property 272 Text Pseudo-Classes 273 The first-letter Pseudo-Class 273 The first-line Pseudo-Class 274 Selectors 276 Universal Selector 277 The Type Selector 277 The Class Selector 277 The ID Selector 278 The Child Selector 278 The Descendant Selector 278 The Adjacent Sibling Selector 279 xii

The General Sibling Selector 279 Using Child and Sibling Selectors To Reduce Dependence on Classes in Markup 279 Attribute Selectors 281 Lengths 283 Relative Units 283 Absolute Units 284 Percentages 284 Introducing the Box Model 285 An Example Illustrating the Box Model 286 The Border Properties 288 The padding Property 291 The margin Property 292 Dimensions of a Box 294 Internet Explorer Box Model Bug 299 Summary 304 Exercises 304 Chapter 8: More Cascading Style Sheets 307 Links 308 Backgrounds 309 The background-color Property 310 The background-image Property 310 The background-repeat Property 312 The background-position Property (for Fixing Position of Backgrounds) 314 The background-attachment Property (for Watermarks) 316 The background Property (the Shorthand) 316 Lists 317 The list-style-type Property 317 The list-style-position Property 318 The list-style-image Property 319 The list-style Property (the Shorthand) 320 Tables 320 Table-Specific Properties 322 The border-collapse Property 323 The border-spacing Property 324 The empty-cells Property 324 The caption-side Property 326 The table-layout Property 327 Outlines 328 The outline-width Property 329 The outline-style Property 329 xiii

The outline-color Property 329 The outline Property (the Shorthand) 329 The :focus and :active Pseudo-Classes 330 Generated Content 331 The :before and :after Pseudo-Elements 331 The content Property 332 Miscellaneous Properties 335 The cursor Property 335 The display Property 337 The visibility Property 337 Additional Rules 338 The @import Rule: Modularized Style Sheets 338 The!important Rule 339 The @charset Rule 340 Positioning and Layout with CSS 340 Normal Flow 341 The position Property 342 Box Offset Properties 342 Relative Positioning 343 Absolute Positioning 344 Fixed Positioning 345 The z-index Property 346 Floating Using the float Property 348 The clear Property 349 Summary 355 Exercises 355 Chapter 9: Page Layout 357 Understanding the Site s Audience 358 Who Will Visit the Site? 358 Why Have They Visited Your Site? 359 What Does a Visitor Need to Achieve a Goal? 361 How Often Will People Want to Visit? 362 Things You Want the Site to Do 362 Prioritizing Information 362 Grouping and Categorization 363 Creating a Site Map 364 Identifying Key Elements for Each Page 365 Page Size (and Screen Resolution) 365 Understanding Screen Sizes 366 Fixed-Width vs. Liquid Designs 367 xiv

Designing Pages 373 Composition and Grids 374 Sketching the Placement of Elements 380 How Visitors Look at a Page 387 Coding Your Design 391 The IE Box Model Bug 391 Working with a Grid 392 Multi-Column Layouts 394 Developing for Mobile Devices 408 Understanding the Medium and How It Is Used 408 How to Approach Mobile Development 410 Building a Mobile Site 413 Summary 419 Exercises 419 Chapter 10: Design Issues 421 Typography 422 Line Length A Measure 422 Font Sizes 424 Choosing Fonts 426 Line Height Leading 427 CSS Resets 429 Line Height Baseline Grids 430 Space Between Letters Tracking 434 White Space 434 Chunking 436 Contrast 437 Navigation 440 Menus 440 Links 449 Site Search Features 452 Tables 454 Padding 454 Headings 455 Shading Alternate Rows 456 Forms 456 Before Designing the Form 457 Designing the Form 459 Layout of Forms 464 Summary 479 Exercises 479 xv

Chapter 11: Learning JavaScript 481 What Is Programming About? 482 How to Add a Script to Your Pages 484 Comments in JavaScript 486 The <noscript> Element 487 The Document Object Model 488 Accessing Values Using Dot Notation 490 The Document Object 491 The Forms Collection 493 Form Elements 495 Images Collection 498 Different Types of Objects 500 Starting to Program with JavaScript 501 Variables 502 Assigning a Value to a Variable 502 Lifetime of a Variable 503 Operators 503 Arithmetic Operators 504 Assignment Operators 504 Comparison Operators 505 Logical or Boolean Operators 506 String Operator (Using + with Strings) 506 Functions 506 How to Define a Function 507 How To Call a Function 507 The Return Statement 508 Conditional Statements 508 if Statements 508 if... else Statements 509 switch Statement 510 Looping 511 while 512 do... while 512 for 513 Infinite Loops and the break Statement 514 Events 514 Built-in Objects 516 String 516 Date 520 Math 523 xvi

Array 525 Window 526 Writing JavaScript 528 A Word About Data Types 529 Keywords 530 Summary 530 Exercises 531 Chapter 12: Working with JavaScript 533 Practical Tips for Writing Scripts 533 Has Someone Already Written This Script? 533 Reusable Functions 534 Using External JavaScript Files 534 Place Scripts in a Scripts Folder 534 Form Validation 535 When to Validate 535 What You Can Check For 535 How to Check a Form 536 Checking Text Fields 536 Select Box Options 551 Radio Buttons 553 Checkboxes 554 Form Enhancements 556 Focus on First Form Item 556 Auto-Tabbing Between Fields 557 Disabling a Text Input 558 Case Conversion 560 Trimming Spaces from Beginning and End of Fields 560 Selecting All the Content of a Text Area 562 Check and Uncheck All Checkboxes 562 JavaScript Libraries 570 Animated Effects Using Scriptaculous 571 Drag-and-Drop Sortable Lists Using Scriptaculous 574 Creating a Lightbox 575 Creating a Modal Window 577 Sortable Tables with MochiKit 578 Creating Calendars with YUI 581 Auto-Completing Text Inputs with YUI 582 Summary 584 Exercises 585 xvii

Chapter 13: Putting Your Site on the Web 587 Meta Tags 588 name and content Attributes 588 http-equiv and content 591 The scheme Attribute 593 Testing Your Site 593 Validating HTML, XHTML, and CSS 594 Link Checking 596 Checking Color Depths 598 Accessibility Checkers 598 Checking in Different Versions of Browsers 599 Pilot Testing 599 Proofreading 601 Taking the Leap to Live 601 Getting a Domain Name 601 Hosting 602 Key Considerations for Choosing a Host 602 Putting Your Site on a Server Using FTP 604 The Importance of Directory Structure and Relative URLs 606 Telling the World about Your Site 607 Always Mention Your URL 608 Content Is King 608 Forums, Communities, and Social Networks 608 Check for Trade Sites and Directories 608 Reciprocal Links 609 Look at Your Competition 609 Make It Easy for People to Link to You 609 Pay-per-click Advertising 610 Display Advertising 612 Create an E-mail Newsletter 612 Understanding Your Visitors 613 Ten Things to Check in Google Analytics 614 Measuring Everything 615 What Next? 616 Tools 617 Introducing Other Technologies 620 Summary 626 xviii

Chapter 14: Checklists 627 Search Engine Optimization Checklist 627 On-Page Techniques 628 Identifying Keywords and Phrases 628 Off-Page Techniques 631 Accessibility Checklist 631 Setting Up Your Document 631 Structural and Semantic Markup 632 Links and Navigation 632 Images and Multimedia 632 Color 633 Tables 633 Forms 634 Style Sheets 634 JavaScript 634 Skip Links 634 Differences Between HTML and XHTML 635 All Tag Names and Attribute Names Must Be Written in Lowercase 635 All Attributes Must Have a Value Given in Double Quotation Marks 636 Elements Must Nest; There Must Be No Overlapping 636 Empty Elements Must Contain a Closing Slash 636 Scripts Should Live in a CDATA Section 636 HTML 5 637 Language Compatibility in HTML 5 637 Stylistic Markup Will Be Removed 637 New Semantic Elements 638 New Values for the <input> Element s type Attribute 639 New Multimedia Elements 639 New APIs 640 Appendix A: Answers to Exercises 641 Appendix B: XHTML Element Reference 677 Appendix C: CSS Properties 713 Appendix D: Color Names and Values 741 xix

Appendix E: Character Encodings 749 Appendix F: Special Characters 753 Appendix G: Language Codes 767 Appendix H: MIME Media Types 771 Appendix I: Deprecated and Browser - Specific Markup 783 Index 815 xx