631
Controlling Windows with Objects 638
Moving and Resizing Windows 643
Using Timeouts 645
Displaying Dialog Boxes 648
Summary 650
Q&A 650
Workshop 651
Exercises 654
Lesson 25: JavaScript Best Practices 655Scripting Best Practices 655
Reading Browser Information 666
Cross-Browser Scripting 669
Supporting Non-JavaScript-Enabled Browsers 671
Creating an Unobtrusive Script 674
Summary 677
Q&A 677
Workshop 677
Exercises 680
Lesson 26: Using Third-Party JavaScript Libraries and Frameworks 681Using Third-Party JavaScript Libraries 681
Adding JavaScript Effects by Using a Third-Party Library 686
Using JavaScript Frameworks 689
Summary 691
Q&A 691
Workshop 692
Exercises 694
PART VI: ADVANCED WEBSITE FUNCTIONALITY AND MANAGEMENT
Lesson 27: Working with Web-Based Forms 695How HTML Forms Work 695
Creating a Form 696
Accepting Text Input 702
Naming Each Piece of Form Data 703
Labeling Each Piece of Form Data 703
Grouping Form Elements 705
Exploring Form Input Controls 706
Using HTML5 Form Validation 716
Submitting Form Data 718
Accessing Form Elements with JavaScript 720
Summary 723
Q&A 725
Workshop 725
Exercises 728
Lesson 28: Organizing and Managing a Website 729When One Page Is Enough 730
Organizing a Simple Site 732
Organizing a Larger Site 735
Optimizing Your Site for Search Engines 738
Writing Maintainable Code 740
Thinking About Version Control 743
Using HTML and CSS Frameworks 745
Summary 746
Q&A 746
Workshop 747
Exercises 750
Index 751
About the author
Jennifer Kyrnin consults professionally on web design and web development. She has built and maintained websites of all sizes, from small single-page sites to large million-page database-driven sites for international audiences. She has taught HTML, XML, and web design online since 1997 and is the author of Sams Teach Yourself HTML5 Mobile Application Development, Sams Teach Yourself Responsive Web Design, and Sams Teach Yourself Bootstrap.
Julie Meloni is a software development manager and technical consultant living in Washington, DC. She has written several books and articles on web-based programming languages and database topics, including the bestselling Sams Teach Yourself PHP, MySQL, and Apache All in One.
Summary
Sams Teach Yourself HTML, CSS, and JavaScript All in One combines these three fundamental web development technologies into one clearly written, carefully organized, step-by-step tutorial that expertly guides the beginner through these three interconnected technologies.
In just a short time, you can learn how to use HTML, Cascading Style Sheets (CSS), and JavaScript together to design, create, and maintain world-class websites. Each lesson in this book builds on the previous ones, enabling you to learn the essentials from the ground up. Clear instructions and practical, hands-on examples show you how to use HTML to create the framework of your website, design your sites layout and typography with CSS, and then add interactivity with JavaScript and jQuery.
Step-by-step instructions carefully walk you through the most common web development tasks.
Practical, hands-on examples show you how to apply what you learn.
Quizzes and exercises help you test your knowledge and stretch your skills.
Learn how to
- Build your own web page and get it online in an instant
- Format text for maximum clarity and readability
- Create links to other pages and to other sites
- Add graphics, color, and visual pizzazz to your web pages
- Work with transparent images and background graphics
- Design your sites layout and typography using CSS
- Make elements move on your page with CSS transformations and transitions
- Animate with CSS and the HTML5 Canvas element
- Write HTML thats responsive web design-ready
- Design a site for mobile devices
- Use CSS media queries and breakpoints
- Get user input with web-based forms
- Use JavaScript to build dynamic, interactive web pages
- Add AJAX effects to your web pages
- Leverage JavaScript libraries such as jQuery
- Make your site easy to maintain and update as it grows