In Action Second Edition

Total Page:16

File Type:pdf, Size:1020Kb

In Action Second Edition Bear Bibeault Covers jQuery 1.4 and jQuery UI 1.8 Yehuda Katz IN ACTION SECOND EDITION MANNING Praise for the First Edition This is an excellent work, a worthy successor to others in Manning’s “In Action” series. It is highly readable and chock-full of working code. The Lab pages are a marvelous way to explore the library, which should become an important part of every web developer’s arsenal. Five stars all ‘round! —David Sills, JavaLobby, Dzone I highly recommend the book for learning the fundamentals of jQuery and then serving as a good reference book as you leverage the power of jQuery more and more in your daily development. —David Hayden, MVP C#, Codebetter.com The Elements of Style for JavaScript. —Joshua Heyer, Trane Inc. For those new to jQuery, this book is a good primer that covers a range of common uses of the framework.... The examples throughout the book are relevant, and make the point effectively. The code snippets are easily distinguishable from the rest of the text, and the text is clear and easy to follow. —Grant Palin, Blogger It works and makes for a very readable book that you can just breeze through very quickly and pick up and retain a lot of information. —Rich Strahl, Blogger Thanks to the authors Bear Bibeault and Yehuda Katz and their exemplary style, this compre- hensive book, or operating manual as it might be called, can be taken in a front-to-back approach to learn from scratch, or as a reference to those already dabbling in jQuery and needing verifica- tion of best practices. —Matthew McCullough, —Denver Open Source Users Group With its capable technical coverage, extensive use of sample code, and approachable style, jQuery in Action is a valuable resource for any Web developer seeking to maximize the power of JavaScript, and a must-have for anyone interested in learning jQuery. —Michael J. Ross, —Web Developer, Slashdot Contributor More Praise for the First Edition An 8 out of 10—buy it! If you want to learn jQuery then this is an excellent book... —John Whish, Founder, —Adobe ColdFusion User Group for Devon I highly recommend this book to any novice or advanced JavaScript developers who finally want to get serious about JavaScript and start writing optimized and elegant code without all the hassle of traditional JavaScript code authoring. —Val’s Blog jQuery in Action offers a rich investigation of the up-and-coming jQuery library for client-side JavaScript. —www.DZone.com I think that jQuery in Action is an excellent book that will help you learn and understand jQuery. I certainly enjoyed reading the book. —Gunnar Hillert, —Atlanta Java User Group jQuery in Action Second Edition BEAR BIBEAULT YEHUDA KATZ MANNING Greenwich (74° w. long.) For online information and ordering of this and other Manning books, please visit www.manning.com. The publisher offers discounts on this book when ordered in quantity. For more information, please contact Special Sales Department Manning Publications Co. 180 Broad St. Suite 1323 Stamford, CT 06901 Email: [email protected] ©2010 by Manning Publications Co. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps. Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books we publish printed on acid-free paper, and we exert our best efforts to that end. Recognizing also our responsibility to conserve the resources of our planet, Manning books are printed on paper that is at least 15 percent recycled and processed without the use of elemental chlorine. Manning Publications Co. Development editor: Lianna Wlasiuk 180 Broad St. Copyeditor: Andy Carroll Suite 1323 Typesetter: Dottie Marsico Stamford, CT 06901 Cover designer: Marija Tudor ISBN 978-1-935182-32-0 Printed in the United States of America 12345678910–MAL–151413121110 brief contents PART 1CORE JQUERY.............................................................. 1 1 ■ Introducing jQuery 3 2 ■ Selecting the elements upon which to act 18 3 ■ Bringing pages to life with jQuery 55 4 ■ Events are where it happens! 93 5 ■ Energizing pages with animations and effects 138 6 ■ Beyond the DOM with jQuery utility functions 169 7 ■ Expand your reach by extending jQuery 204 8 ■ Talk to the server with Ajax 235 PART 2 JQUERY UI .............................................................. 279 9 ■ Introducing jQuery UI: themes and effects 281 10 ■ jQuery UI mouse interactions: Follow that mouse! 305 11 ■ jQuery UI widgets: Beyond HTML controls 346 appendix ■ JavaScript that you need to know but might not! 415 v contents list of lab pages xiii foreword to the first edition xv preface to the second edition xvii preface to the first edition xix acknowledgments xxii about this book xxv about the authors xxx about the cover illustration xxxii PART 1CORE JQUERY .................................................. 1 Introducing jQuery 3 1 1.1 Power in the economy of code 4 1.2 Unobtrusive JavaScript 6 Separating behavior from structure 6 ■ Segregating the script 7 1.3 jQuery fundamentals 8 The jQuery wrapper 8 ■ Utility functions 11 ■ The document ready handler 11 ■ Making DOM elements 13 ■ Extending jQuery 14 ■ Using jQuery with other libraries 16 1.4 Summary 16 vii viii CONTENTS Selecting the elements upon which to act 18 2 2.1 Selecting elements for manipulation 19 Controlling the context 20 ■ Using basic CSS selectors 22 Using child, container, and attribute selectors 23 ■ Selecting by position 27 ■ Using CSS and custom jQuery filter selectors 29 2.2 Generating new HTML 32 2.3 Managing the wrapped element set 35 Determining the size of a wrapped set 37 ■ Obtaining elements from a wrapped set 37 ■ Slicing and dicing a wrapped element set 41 ■ Getting wrapped sets using relationships 49 ■ Even more ways to use a wrapped set 51 ■ Managing jQuery chains 52 2.4 Summary 54 Bringing pages to life with jQuery 55 3 3.1 Working with element properties and attributes 56 Manipulating element properties 58 ■ Fetching attribute values 58 ■ Setting attribute values 60 ■ Removing attributes 62 ■ Fun with attributes 62 ■ Storing custom data on elements 64 3.2 Changing element styling 65 Adding and removing class names 66 ■ Getting and setting styles 70 3.3 Setting element content 77 Replacing HTML or text content 77 ■ Moving and copying elements 78 ■ Wrapping and unwrapping elements 84 Removing elements 86 ■ Cloning elements 87 ■ Replacing elements 88 3.4 Dealing with form element values 89 3.5 Summary 92 Events are where it happens! 93 4 4.1 Understanding the browser event models 95 The DOM Level 0 Event Model 95 ■ The DOM Level 2 Event Model 101 ■ The Internet Explorer Event Model 106 4.2 The jQuery Event Model 106 Binding event handlers with jQuery 107 ■ Removing event handlers 111 ■ Inspecting the Event instance 112 ■ Proactively managing event handlers 115 ■ Triggering event handlers 117 Other event-related methods 119 CONTENTS ix 4.3 Putting events (and more) to work 124 Filtering large data sets 124 ■ Element creation by template replication 126 ■ Setting up the mainline markup 129 Adding new filters 130 ■ Adding the qualifying controls 133 Removing unwanted filters and other tasks 134 ■ There’s always room for improvement 135 4.4 Summary 136 Energizing pages with animations and effects 138 5 5.1 Showing and hiding elements 139 Implementing a collapsible “module” 140 ■ Toggling the display state of elements 143 5.2 Animating the display state of elements 144 Showing and hiding elements gradually 144 ■ Fading elements into and out of existence 149 ■ Sliding elements up and down 152 Stopping animations 153 5.3 Creating custom animations 154 A custom scale animation 156 ■ A custom drop animation 156 A custom puff animation 157 5.4 Animations and Queuing 159 Simultaneous animations 159 ■ Queuing functions for execution 162 ■ Inserting functions into the effects queue 166 5.5 Summary 167 Beyond the DOM with jQuery utility functions 169 6 6.1 Using the jQuery flags 170 Disabling animations 170 ■ Detecting user agent support 171 The browser detection flags 175 6.2 Using other libraries with jQuery 177 6.3 Manipulating JavaScript objects and collections 180 Trimming strings 180 ■ Iterating through properties and collections 181 ■ Filtering arrays 183 ■ Translating arrays 184 More fun with JavaScript arrays 186 ■ Extending objects 187 Serializing parameter values 189 ■ Testing objects 193 6.4 Miscellaneous utility functions 194 Doing nothing 194 ■ Testing for containment 194 ■ Tacking data onto elements 195 ■ Prebinding function contexts 195 Parsing JSON 198 ■ Evaluating expressions 199 Dynamically loading scripts 199 6.5 Summary 202 x CONTENTS Expand your reach by extending jQuery 204 7 7.1 Why extend jQuery? 205 7.2 The jQuery plugin authoring guidelines 205 Naming files and functions 206 ■ Beware the $ 207 ■ Taming complex parameter lists 208 7.3 Writing custom utility functions 210 Creating a data manipulation utility function 211 ■ Writing a date formatter 212 7.4 Adding new wrapper methods 216 Applying multiple operations in a wrapper method 218 Retaining state within a wrapper method 223 7.5 Summary 233 Talk to the server with Ajax
Recommended publications
  • Analyzing Safari 2.X Web Browser Artifacts Using SFT
    Analyzing Safari 2.x Web Browser Artifacts using SFT. Copyright 2007 - Jacob Cunningham (v1.0) Table of Contents Introduction:...............................................................................................................................................3 Safari Forensic Tools................................................................................................................................. 3 OSX Property List files..............................................................................................................................3 Safari Related Files.................................................................................................................................... 4 The Safari Preferences files....................................................................................................................... 5 Browser History......................................................................................................................................... 7 Downloads history:.................................................................................................................................... 8 Bookmarks file ........................................................................................................................................10 Cookies file:............................................................................................................................................. 11 Browser Cache........................................................................................................................................
    [Show full text]
  • Smug May 09 Final
    STANFORD/PALO ALTO MACINTOSH USERS GROUP NEWSLETTER Vol.19 No.5 May 2009 Will be presenting at the monday May 4 Meeting Kathy Garrigan will be the presenter. Avery DesignPro for Mac is software that lets you print on Avery products on your Macintosh. Like business cards, label sheets, greeting cards, iron-ons, and so on. Both Dave and myself have only used the CD. The business card template and labels are very easy to use. I hope to have some samples of the things that I used the Avery templates for. Cards, T-shirts and hopefully wine labels. The great part about this app it is FREE!!!! Lorrie bleiler "Select All." April Meeting Report "Go to end." "Undo dictation." "Select the word 'sigh'". by Dave Strom (Note from Dave: Hey, this works really well!) Jay is read- MacSpeech ing words, and he will speak punctuation like "period" or and Drobo "hyphen", and the punctuation goes in. We had two (count 'em: two in "Capitalize the word group", and Dictate capped it! "Open one!) this evening. Quote", and Jay read, then said "comma", then Jay read MacSpeech and Drobo. more, "close quote", "period", "go to sleep". MacSpeech If you speak fast, you can get up to 120 words a minute, www.macspeech.com but with most people it is more like 60, then 80-90 with Jay Gonzales presented MacSpeech Dictate. This software, practice. Dictate can keep up with you. It will not print out with a microphone, does speech recognition on the the text instantly (note from Dave: I notice it does buffer Macintosh.
    [Show full text]
  • Personalizing Voyager Using Browser Extensions
    University of Kentucky UKnowledge Library Presentations University of Kentucky Libraries 5-8-2015 Personalizing Voyager Using Browser Extensions Kathryn Lybarger University of Kentucky, [email protected] Right click to open a feedback form in a new tab to let us know how this document benefits oy u. Follow this and additional works at: https://uknowledge.uky.edu/libraries_present Part of the Cataloging and Metadata Commons Repository Citation Lybarger, Kathryn, "Personalizing Voyager Using Browser Extensions" (2015). Library Presentations. 128. https://uknowledge.uky.edu/libraries_present/128 This Presentation is brought to you for free and open access by the University of Kentucky Libraries at UKnowledge. It has been accepted for inclusion in Library Presentations by an authorized administrator of UKnowledge. For more information, please contact [email protected]. Personalizing Voyager using Browser Extensions Kathryn Lybarger @zemkat ELUNA 2015 #eluna2015 May 8, 2015 Personalizing Voyager As an institution, we have a fair amount of power over how Voyager’s OPAC looks Colors and fonts Which fields are searchable What displays in search results What displays in full record view … (anything really) Must find a balance Provide good access to most of our patrons Don’t clutter the interface needlessly But how about… Personalizing for particular groups of patrons? Personalizing for staff needs? Doing so quickly? Even temporarily? Web browser extensions Custom search bars Extensions Bookmarklets User scripts Browser
    [Show full text]
  • Mozilla: a Users Guide
    Mozilla: A Users Guide. or Using the Mozilla Application Suite Kevin T. Neely October 17, 2003 Contents 1 Installation 15 1.1 Deciding which Mozilla to Run ........................ 15 1.1.1 Platform ................................. 15 1.1.2 Version .................................. 15 1.2 Installing Mozilla ................................ 16 1.2.1 Using an Installer Package ....................... 16 1.2.2 Manual Installation ........................... 17 1.3 Upgrading .................................... 19 1.3.1 Make a Backup ............................. 19 1.3.2 Uninstall ................................. 19 1.3.3 Install Mozilla .............................. 20 1.3.4 Retrieve Missing Files ......................... 20 1.4 Running Multiple versions of Mozilla ..................... 21 2 Getting Started and Mozilla Basics 23 2.1 Starting Mozilla ................................. 23 2.2 Exiting Mozilla ................................. 23 2.2.1 QuickLaunch .............................. 23 3 CONTENTS CONTENTS 2.3 Preferences ................................... 24 2.4 Advanced Settings ............................... 24 2.4.1 prefs.js .................................. 25 2.4.2 user.js .................................. 25 2.4.3 userContent.css ............................. 26 2.5 Profiles ...................................... 27 2.6 Themes ..................................... 27 2.7 Security ..................................... 27 2.7.1 Passwords ................................ 27 2.8 Cookies ....................................
    [Show full text]
  • Firefox Hacks Is Ideal for Power Users Who Want to Maximize The
    Firefox Hacks By Nigel McFarlane Publisher: O'Reilly Pub Date: March 2005 ISBN: 0-596-00928-3 Pages: 398 Table of • Contents • Index • Reviews Reader Firefox Hacks is ideal for power users who want to maximize the • Reviews effectiveness of Firefox, the next-generation web browser that is quickly • Errata gaining in popularity. This highly-focused book offers all the valuable tips • Academic and tools you need to enjoy a superior and safer browsing experience. Learn how to customize its deployment, appearance, features, and functionality. Firefox Hacks By Nigel McFarlane Publisher: O'Reilly Pub Date: March 2005 ISBN: 0-596-00928-3 Pages: 398 Table of • Contents • Index • Reviews Reader • Reviews • Errata • Academic Copyright Credits About the Author Contributors Acknowledgments Preface Why Firefox Hacks? How to Use This Book How This Book Is Organized Conventions Used in This Book Using Code Examples Safari® Enabled How to Contact Us Got a Hack? Chapter 1. Firefox Basics Section 1.1. Hacks 1-10 Section 1.2. Get Oriented Hack 1. Ten Ways to Display a Web Page Hack 2. Ten Ways to Navigate to a Web Page Hack 3. Find Stuff Hack 4. Identify and Use Toolbar Icons Hack 5. Use Keyboard Shortcuts Hack 6. Make Firefox Look Different Hack 7. Stop Once-Only Dialogs Safely Hack 8. Flush and Clear Absolutely Everything Hack 9. Make Firefox Go Fast Hack 10. Start Up from the Command Line Chapter 2. Security Section 2.1. Hacks 11-21 Hack 11. Drop Miscellaneous Security Blocks Hack 12. Raise Security to Protect Dummies Hack 13. Stop All Secret Network Activity Hack 14.
    [Show full text]
  • Developing Applications with Oracle Visual Builder
    Oracle® Cloud Developing Applications with Oracle Visual Builder Release 21.10.0 F43660-01 August 2021 Oracle Cloud Developing Applications with Oracle Visual Builder, Release 21.10.0 F43660-01 Copyright © 2018, 2021, Oracle and/or its affiliates. Primary Author: Oracle Corporation This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software" or "commercial computer software
    [Show full text]
  • JSN Mico 1 Configuration Manual Getting Started
    JSN Mico 1 Configuration Manual Getting Started Template Installation After downloading, you should have a template installation file called jsn_mico_pro_unlimited_Z.Z.Z_install.zip if you purchased the PRO UNLIMITED Edition, or jsn_mico_pro_standard_Z.Z.Z_install.zip if you purchased the PRO STANDARD Edition. ZZZ is the template version This is a standard Joomla! Template installation file, which can be installed in Joomla! Administration as usual. Here are quick instructions to remind you: In Joomla! Administration, go to menu Extensions -> Extension Manager Once you are on Extension Manager, click Browse button and select template installation file jsn_mico_pro_unlimited_Z.Z.Z_install.zip or jsn_mico_pro_standard_Z.Z.Z_install.zip. After that, click on button Upload & Install. Installation file will be uploaded to your server and installed in Joomla! Set the templates as default, go to menu Extensions -> Template Manager Sample Data Installation All JoomlaShine templates have unique feature of installing sample data which makes your testing website look the same as on the template demo website. You can choose to install: Sample Data – A light package with only JSN Mico data. You install it on your available Joomla website Sample data will be installed for common Joomla components and for supported third-party extensions (K2, Kunena, VirtueMart, OS Property...) which are already available on your website. If you have installed the third-party extensions after installing Sample Data, you must reinstall the Sample Data to have the content for those extensions. QuickStart package – It contains both the latest Joomla installation file and JSN Mico. By default, free extensions like K2 and Kunena are already included in the package with their sample data.
    [Show full text]
  • Sign-In Page Customization Guide
    Customizing the Leostream Sign In Page Remote Access to Anything, from Anywhere, for Everyone Version 9.0.40 February 2021 Leostream Customization Guide Connection Broker Login Page Design The Leostream Sign In page can be fully customized to match the style of your organization. This guide provides examples you can use for basic customization. To begin, it helps to have the following files and information ready: • A company logo in PNG format named custom_logo.png that is approximately 350x50 pixels • A 64x64 pixel image named favicon.ico to display in browser tabs – you can create this file by renaming a png file to ico. • Any additional graphics in PNG format • Any text content to be added • The hexadecimal value for any colors you want to add or change The following examples start with the standard Leostream login page: Important File Locations To customize the Sign in page, you must log into the console of the machine running your Leostream Connection Broker. You can find the Connection Broker files that define the style and layout of the Sign In page in the following directories: • /home/leo/app/css – Contains files that define styles • /home/leo/app/templates – Contains files that define page layouts • /home/leo/app/tpc – Contains third-party content uploaded into your Connection Broker 2 © Copyright 2021 Leostream Corporation Leostream Customization Guide The css and templates directories has a custom subdirectory where you must store all customizations you make to the Sign In page. Any customizations made outside of the custom directories to files in the parent directories are lost during Connection Broker updates.
    [Show full text]
  • Web Standards.Pdf
    BOOKS FOR PROFESSIONALS BY PROFESSIONALS® Sikos, Ph.D. RELATED Web Standards Web Standards: Mastering HTML5, CSS3, and XML gives you a deep understand- ing of how web standards can be applied to improve your website. You will also find solutions to some of the most common website problems. You will learn how to create fully standards-compliant websites and provide search engine-optimized Web documents with faster download times, accurate rendering, lower development costs, and easy maintenance. Web Standards: Mastering HTML5, CSS3, and XML describes how you can make the most of web standards, through technology discussions as well as practical sam- ple code. As a web developer, you’ll have seen problems with inconsistent appearance and behavior of the same site in different browsers. Web standards can and should be used to completely eliminate these problems. With Web Standards, you’ll learn how to: • Hand code valid markup, styles, and news feeds • Provide meaningful semantics and machine-readable metadata • Restrict markup to semantics and provide reliable layout • Achieve full standards compliance Web standardization is not a sacrifice! By using this book, we can create and maintain a better, well-formed Web for everyone. CSS3, and XML CSS3, Mastering HTML5, US $49.99 Shelve in Web Development/General User level: Intermediate–Advanced SOURCE CODE ONLINE www.apress.com www.it-ebooks.info For your convenience Apress has placed some of the front matter material after the index. Please use the Bookmarks and Contents at a Glance links to access them. www.it-ebooks.info Contents at a Glance About the Author................................................................................................
    [Show full text]
  • RSTEP GNR Proposal Review Team Report
    ICANN Registry Services Technical Evaluation Panel Report on Internet Security and Stability Implications of the Global Name Registry, LTD Proposal for the Limited Release of Initially Reserved Two-Character Names December 4, 2006 Preface This report presents the findings of a technical evaluation of the proposal1 by Global Name Registry, LTD for the limited release of initially reserved two-character Second Level Domain (SLD) names into the .name unsponsored generic Top-Level Domain (TLD). On 8 November 2005 ICANN adopted2 a consensus policy developed by its Generic Names Supporting Organization (GNSO) concerning the review and approval of requests by gTLD registry operators for new registry services.3 This policy was implemented on 25 July 20064 as the Registry Services Evaluation Policy.5 The policy provides for the evaluation of a proposed registry service by a team of experts selected from a standing Registry Service Technical Evaluation Panel (RSTEP)6 when ICANN determines that the service could raise significant security or stability issues. The process begins with a preliminary determination by ICANN that an RSTEP review is or is not required for a particular proposed registry service.7 If ICANN determines that a review is required, an RSTEP review team investigates and evaluates the proposed service with respect to its potential impact on security or stability, as defined by the consensus policy: Security—An effect on security by the proposed Registry Service shall mean (a) the unauthorized disclosure, alteration, insertion, or destruction of Registry Data, or (b) the unauthorized access to or disclosure of information or resources on the Internet by systems operating in accordance with all applicable standards.
    [Show full text]
  • How to Add a Favicon to Your Website
    How to Add a Favicon to Your Website STEP 1: Create your favicon image using a photo editing system or favicon generator. Your final favicon dimensions should be 16 x 16 pixels. In this tutorial, we will be using a free online favicon generator called Favicon.cc ( http://www.favicon.cc ). Sub-Step A: Click “ Import image ” Tutorial Compliments of JHC. www.JonesHouseCreative.com Page 1 of 3 Sub-Step B: Click “ Choose File ” and browse to the desired image on your computer. Select the “Keep dimensions ” radio button and click “ Upload .” Sub-Step C: Preview your image. When ready, click “ Download Favicon .” Save the image (titled favicon.ico ) to your desktop or other easy to navigate location. Tutorial Compliments of JHC. www.JonesHouseCreative.com Page 2 of 3 STEP 2: Open your FTP client. (If you are unfamiliar with FTP clients, please see our instructions on using FTP before transferring files at the server level.) STEP 3: Transfer the favicon.ico to your web server in two places. (1) On your website server side, browse to public_html. From your computer side, highlight and transfer the favicon.ico file into the site server side. (2) Browse to public_html > wp-content > themes > Your Active Theme Name > images. Once again, highlight the .ico file on your computer side and transfer to the images folder. STEP 4: From your Wordpress dashboard, hover over “ Appearance ” and select “ Editor .” Open the file titled “ Header ” or “ Header.php .” STEP 5: Press Ctrl+F to search and look for a line of code starting with: <link rel=“shortcut icon” and ending with /favicon.icon” /> .
    [Show full text]
  • How to Use HTML to Structure a Web Page
    Chapter 3 How to use HTML to structure a web page HTML, XHTML, and CSS, C3© 2010, Mike Murach & Associates, Inc. Slide 1 Objectives Applied 1. Code a properly structured HTML web page using any of the elements and attributes that are presented in this chapter. 2. Given the HTML for a web page, code a relative URL that refers to any file in the directory structure for the web site. HTML, XHTML, and CSS, C3 © 2010, Mike Murach & Associates, Inc. Slide 2 Objectives (continued) Knowledge 1. Describe the use of the DOCTYPE declaration, the title element in the head section, and metadata. 2. Distinguish between a block element and an inline element. 3. Describe the use of these block elements: div, h1, h2, h3, and p. 4. Describe the use of these inline elements: br, i, b, and span. 5. Describe the use of character entities like &nbsp; or &copy;. 6. Describe the use of these core attributes: id, class, and title. 7. Distinguish between absolute and relative URLs. 8. Describe the use of the a element. 9. Describe two types of lists that you can create with HTML. 10. Describe the use of the img element. HTML, XHTML, and CSS, C3 © 2010, Mike Murach & Associates, Inc. Slide 3 The three flavors of HTML 4.01 and XHTML 1.0 Strict Transitional Frameset HTML, XHTML, and CSS, C3 © 2010, Mike Murach & Associates, Inc. Slide 4 Some common DOCTYPE declarations HTML 4.01 Strict <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> HTML 4.01 Transitional <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> XHTML 1.0 Strict <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> HTML, XHTML, and CSS, C3 © 2010, Mike Murach & Associates, Inc.
    [Show full text]