earn the in-demand skills that let you turn lines of code into websites and apps Web Coding & Development All-in-One For Dummies is a one-stop resource for would-be developers who need guidance on the languages and steps used to build websites and applications. Learn the coding ropes and expand your existing skillset with this easy-to-understand guide. In these complete mini-books, you’ll walk through the basics of web development, structuring a page, building and processing web forms, and beyond. Learn how to build a website or create your very own app with the advice of web coding and development experts. This edition expands JavaScript and CSS coverage while providing new content on server-side coding and the development stack. Get essential knowledge of how web development works—even if you’ve never written a line of code in your life Learn HTML, CSS, JavaScript, and other languages essential for building websites and apps Discover how to make optimize your sites and apps for mobile devices Expand on what you already know and improve your employability This Dummies All-in-One is great for you if want to develop coding skills but don’t have a programming background. It’s also perfect for professionals looking to brush up on their web development skills and get up to date on the latest trends and standards. Cover Title Page Copyright Introduction About This Book Foolish Assumptions Icons Used in This Book Beyond the Book Book 1: Getting Ready to Code for the Web Chapter 1: How Web Coding and Development Work The Nuts and Bolts of Web Coding and Development Understanding the Front End: HTML and CSS Understanding the Back End: PHP and MySQL How It All Fits Together: JavaScript How Dynamic Web Pages Work What Is a Web App? Understanding the Difference between Web Coding and Web Development Chapter 2: Setting Up Your Web Development Home What Is a Local Web Development Environment? Do You Need a Local Web Development Environment? Setting Up the XAMPP for Windows Development Environment Setting Up the XAMPP for OS X Development Environment Choosing Your Text Editor Chapter 3: Finding and Setting Up a Web Host Understanding Web Hosting Providers A Buyer’s Guide to Web Hosting Finding a Web Host Finding Your Way around Your New Web Home Book 2: Coding the Front End, Part 1: HTML and CSS Chapter 1: Structuring the Page with HTML Getting the Hang of HTML Understanding Tag Attributes Learning the Fundamental Structure of a Web Page Some Notes on Structure versus Style Applying the Basic Text Tags Creating Links Building Bulleted and Numbered Lists Inserting Special Characters Inserting Images Carving Up the Page Commenting Your HTML Code Chapter 2: Styling the Page with CSS Figuring Out Cascading Style Sheets Getting the Hang of CSS Rules and Declarations Adding Styles to a Page Styling Page Text Working with Colors Getting to Know the Web Page Family Using CSS Selectors Revisiting the Cascade Chapter 3: Sizing and Positioning Page Elements Learning about the CSS Box Model Styling Sizes Adding Padding Building Borders Making Margins Getting a Grip on Page Flow Floating Elements Positioning Elements Chapter 4: Creating the Page Layout What Is Page Layout? Making Flexible Layouts with Flexbox Shaping the Overall Page Layout with CSS Grid Book 3: Coding the Front End, Part 2: JavaScript Chapter 1: An Overview of JavaScript Controlling the Machine What Is a Programming Language? Is JavaScript Hard to Learn? What You Can Do with JavaScript What You Can’t Do with JavaScript What You Need to Get Started Basic Script Construction A Quick Introduction to the Console Dealing with a Couple of Exceptional Cases Adding Comments to Your Code Creating External JavaScript Files Chapter 2: Understanding Variables Understanding Variables Naming Variables: Rules and Best Practices Understanding Literal Data Types JavaScript Reserved Words JavaScript Keywords Chapter 3: Building Expressions Understanding Expression Structure Building Numeric Expressions Building String Expressions Building Comparison Expressions Building Logical Expressions Understanding Operator Precedence Chapter 4: Controlling the Flow of JavaScript Making True/False Decisions with if Statements Branching with if...else Statements Making Multiple Decisions Understanding Code Looping Using while Loops Using for Loops Using do...while Loops Controlling Loop Execution Avoiding Infinite Loops Chapter 5: Harnessing the Power of Functions What Is a Function? The Structure of a Function Where Do You Put a Function? Calling a Function Passing Values to Functions Returning a Value from a Function Getting Your Head around Anonymous Functions Moving to Arrow Functions Running Functions in the Future Understanding Variable Scope Using Recursive Functions Chapter 6: Playing with the Document Object Model Working with Objects Getting to Know the Document Object Model Specifying Elements Traversing the DOM Manipulating Elements Modifying CSS with JavaScript Tweaking HTML Attributes with JavaScript Chapter 7: Building Reactive Pages with Events What’s an Event? Understanding the Event Types Listening for an Event Getting Data about the Event Preventing the Default Event Action Example: The DOMContentLoaded Event Example: The dblclick Event Chapter 8: Working with Arrays What Is an Array? Declaring an Array Populating an Array with Data How Do I Iterate Thee? Let Me Count the Ways Creating Multidimensional Arrays Manipulating Arrays Chapter 9: Manipulating Strings, Dates, and Numbers Manipulating Text with the String Object Dealing with Dates and Times Working with Numbers: The Math Object Chapter 10: Storing User Data in the Browser Understanding Web Storage Introducing JSON Adding Data to Web Storage Getting Data from Web Storage Removing Data from Web Storage Chapter 11: More JavaScript Goodies Expanding Arrays and Objects with the Spread Operator Condensing Arrays with the Rest Parameter Exporting and Importing Code Book 4: Coding the Back End: PHP and MySQL Chapter 1: Learning PHP Coding Basics Understanding How PHP Scripts Work Outputting Text and Tags Working with PHP Arrays Controlling the Flow of Your PHP Code Working with PHP Functions Working with PHP Objects Chapter 2: Building and Querying MySQL Databases What Is MySQL? Introducing phpMyAdmin Creating a MySQL Database and Its Tables Querying MySQL Data Chapter 3: Using PHP to Access MySQL Data Understanding the Role of PHP and MySQL in Your Web App Using PHP to Access MySQL Data Creating and Running Insert, Update, and Delete Queries Separating Your MySQL Login Credentials Book 5: Debugging Your Code Chapter 1: Debugging CSS Code Displaying the Web Development Tools Inspecting an Element Editing a Property Value Disabling a Declaration Adding an Inline Declaration to an Element Adding an Element Declaration to the Inspector Stylesheet Adding a Class to an Element Simulating a Pseudo-Class State Chapter 2: Debugging JavaScript Code Understanding JavaScript’s Error Types Getting to Know Your Debugging Tools Debugging with the Console Window Pausing Your Code Stepping Through Your Code Monitoring Script Values More Debugging Strategies The 10 Most Common JavaScript Errors The 10 Most Common JavaScript Error Messages Chapter 3: Debugging PHP Code Configuring php.ini for Debugging Accessing the PHP Error Log Outputting Variable Values Book 6: Coding Dynamic and Static Web Pages Chapter 1: Fetching Data with PHP, JavaScript, and JSON Getting Your Head Around Asynchronous Operations Getting Remote Data Asynchronously with the Fetch API Returning Fetch API Data as JSON Text Chapter 2: Building and Processing Web Forms What Is a Web Form? Understanding How Web Forms Work Building an HTML Web Form Looking at the HTMLFormElement Object Taking a Peek at the HTMLInputElement Object Programming Text Fields Coding Check Boxes Dealing with Radio Buttons Programming Selection Lists Handling and Triggering Form Events Creating Keyboard Shortcuts for Form Controls Submitting the Form Chapter 3: Validating Form Data Validating Form Data in the Browser Validating Form Data on the Server Regular Expressions Reference Chapter 4: Coding Static Web Pages Static? Dynamic? What Am I Even Talking About? Building Your Own Static Site Generator Using GitHub to Store Your Static Site Files Forging Your HTML Template File Using PHP to Generate the Static Pages Deploying Your Static Website Book 7: Building Web Apps Chapter 1 Planning a Web App What Is a Web App? Planning Your Web App: The Basics Chapter 2: Making a Web App Responsive Defining a Responsive Layout Going with the Flow: Fluid Layouts Querying Your Way to Responsiveness: Adaptive Layouts Working with Images Responsively Exploring the Principles of Mobile-First Development Chapter 3: Making a Web App Accessible Why You Need to Make Your Apps Accessible Understanding Web Accessibility Making Your App Structure Accessible Making Text Accessible Making Media Accessible Buffing Up Your App Accessibility Semantics Making Your Apps Keyboard-Friendly Ensuring Sufficient Color Contrast Validating the Accessibility of an App Chapter 4: Securing a Web App Web App Security: Nutshell Version Understanding the Dangers Sanitizing Incoming Data Escaping Outgoing Data Securing File Uploads Securing Passwords Setting Up a Secure Directory Structure Understanding PHP Sessions Creating a Back-End Initialization File Index About the Author Advertisement Page Connect with Dummies End User License Agreement