Introduction

I love the Internet, and if you picked up this book, you probably do, too. The Internet is dynamic, chaotic, exciting, interesting, and useful, all at the same time. The web is pretty fun from a user's point of view, but that's only part of the story. Perhaps the best part of the Internet is how participatory it is. You can build your own content — free! It's really amazing. There's never been a form of communication like this before. Anyone with access to a minimal PC and a little bit of knowledge can create his or her own homestead in one of the most exciting platforms in the history of communication.

The real question is how to get there. A lot of web development books are really about how to use some sort of software you have to buy. That's okay, but it isn't necessary. Many software packages have evolved that purport to make web development easier — and some work pretty well — but regardless what software package you use, there's still a need to know what's really going on under the surface. That's where this book comes in.

About This Book

You'll find out exactly how the web works in this book. You'll figure out how to use various tools, but, more importantly, you'll create your piece of the web. You'll discover:

  • How web pages are created: You'll figure out the basic structure of web pages. You'll understand the structure well because you build pages yourself. No mysteries here.
  • How to separate content and style: You'll understand the foundation of modern thinking about the Internet — that style should be separate from content.
  • How to use web standards: The web is pretty messy, but, finally, some standards have arisen from the confusion. You'll discover how these standards work and how you can use them.
  • How to create great-looking web pages: Of course, you want a terrific-looking website. With this book, you'll find out how to use layout, style, color, and images.
  • How to build modern layouts: Many web pages feature columns, menus, and other fancy features. You'll figure out how to build all these things.
  • How to add interactivity: Adding forms to your pages, validating form data, and creating animations are all possible with the JavaScript language.
  • How to write programs on the server: Today's web is powered by programs on web servers. You'll discover the powerful PHP language and figure out how to use it to create powerful and effective sites.
  • How to harness the power of data: Every web developer eventually needs to interact with data. You'll read about how to create databases that work. You'll also discover how to connect databases to your web pages and how to create effective and useful interfaces.
  • How AJAX is changing everything: The hottest web technology on the horizon is AJAX (Asynchronous JavaScript and XML). You'll figure out how to harness this way of working and use it to create even more powerful and interesting applications.

Foolish Assumptions

I don't have any foolish assumptions: I'm not assuming anything in this book. If you've never built a web page before, you're in the right hands. You don't need any experience, and you don't have to know anything about HTML, programming, or databases. I discuss everything you need.

If you're reasonably comfortable with a computer (you can navigate the web and use a word processor), you have all the skills you need.

If you've been around web development for a while, you'll still find this book handy.

If you've used HTML but not HTML5, see how things have changed and discover the powerful combination of HTML5 and CSS3.

You'll see how new HTML and CSS features can literally make your web pages sing and dance, with support for advanced tools like audio and video embedding, animation, and much more.

If you're already comfortable with HTML and CSS, you're ready to add JavaScript functionality for form validation and animation. If you've never used a programming language before, JavaScript is a really great place to start.

If you're starting to get serious about web development, you've probably already realized that you'll need to work with a server at some point. PHP is a really powerful, free, and easy language that's extremely prominent on the web landscape. You'll use this to have programs send e-mails, store and load information from files, and work with databases.

If you're messing with commercial development, you'll definitely need to know more about databases. I get e-mails every week from companies looking for people who can create a solid relational database and connect it to a website with PHP.

If you're curious about AJAX, you can read about what it is, how it works, and how to use it to add functionality to your site. You'll also read about a very powerful and easy AJAX library that can add tremendous functionality to your bag of tricks.

I wrote this book as the reference I wish I had. If you have only one web development book on your shelf, this should be the one. Wherever you are in your web development journey, you can find something interesting and new in this book.

Use Any Computer

One of the great things about web development is how accessible it can be. You don't need a high-end machine to build websites. Whatever you're using now will probably do fine. I tested most of the examples in this book with Windows 7, Ubuntu Linux, and a Macbook pro. I've tested on computers ranging from cutting-edge platforms to mobile devices to a $35 Raspberry Pi. Most of the software I use in the book is available free for all major platforms. Similar alternatives for all platforms are available in the few cases when this isn't true.

Don't Buy Any Software

Everything you need for web development is on the companion website. I've used only open-source software for this book. Following are the highlights:

  • Komodo Edit: Komodo Edit is my current favorite editor. It's a solid free text editor well suited to the many text-editing tasks you'll run across in your programming travels. It also works exactly the same on every platform, so it doesn't really matter what computer or operating system you're running.
  • XAMPP: When you're ready to move to the server, XAMPP is a complete server package that's easy to install and incredibly powerful. This includes the incredible Apache web server, the PHP programming language, the MySQL database manager, and tons of useful utilities.
  • Useful tools: Every time I use a tool (such as a data mapper, a diagram tool, or an image editor) in this book, I make it available on the companion website.

There's no need to buy any expensive web development tools. Everything you need is here and no harder than the more expensive web editors.

How This Book Is Organized

Web development is about solving a series of connected but different problems. This book is organized into eight minibooks based on specific technologies. You can read them in any order you wish, but you'll find that the later books tend to rely on topics described in the earlier books. (For example, JavaScript doesn't make much sense without HTML because JavaScript is usually embedded in a web page written with HTML.) The following describes these eight minibooks:

  • Book I: Creating the HTML Foundation — Web development incorporates a lot of languages and technologies, but HTML is the foundation. Here I show you HTML5, the latest incarnation of HTML, and describe how it's used to form the basic skeleton of your pages.
  • Book II: Styling with CSS — In the old days, HTML had a few tags to spruce up your pages, but they weren't nearly powerful enough. Today, developers use Cascading Style Sheets (CSS) to add color and formatting to your pages as well as zing and pizazz. (I'm pretty sure those are formal computer programming words.)
  • Book III: Building Layouts with CSS — Discover the best ways to set up layouts with floating elements, fixed positioning, and absolute positioning. Figure out how to build various multicolumn page layouts and how to create dynamic buttons and menus.
  • Book IV: Client-Side Programming with JavaScript — Figure out essential programming skills with the easy and powerful JavaScript language — even if you've never programmed before. Manipulate data in web forms and use powerful regular expression technology to validate form entries. Also discover how to create animations with JavaScript with the powerful new <canvas> element.
  • Book V: Server-Side Programming with PHP — Move your code to the server and take advantage of this powerful language. Figure out how to respond to web requests; work with conditions, functions, objects, and text files; and connect to databases.
  • Book VI: Managing Data with MySQL — Most serious Web projects are eventually about data. Figure out how databases are created, how to set up a secure data server, the basics of data normalization, and how to create a reliable and trustworthy data back end for your site.
  • Book VII: Integrating the Client and Server with AJAX — Look forward to the technology that has the web abuzz. AJAX isn't really a language but rather a new way of thinking about web development. Get the skinny on what's going on here, build an AJAX connection or two by hand, and read about some really cool libraries for adding advanced features and functionality to your pages.
  • Book VIII: Moving from Pages to Sites — This minibook ties together many of the threads throughout the rest of the book. Discover how to create your own complete web server solution or pick a web host. Walk through the process of designing a complex multipage web site. Discover how to use content management systems to simplify complex websites and, finally, to build your own content management system with skills taught throughout the book.

New for the Third Edition

This is actually the third edition of this book. (The previous editions were called HTML, XHTML, and CSS All in One For Dummies.) I have made a few changes to keep up with advances in technology:

  • Focus on HTML5: The first edition of the book used HTML4, the second edition used XHTML, and this edition uses HTML5. I'm very excited about HTML5 because it's easier to use than either of the older versions, and quite a bit more powerful.
  • Integration with CSS3: CSS3 is the latest incarnation of CSS, and it has some wonderful new features too, including the ability to use custom fonts, animation, and new layout mechanisms.
  • Improved PHP coverage: PHP has had some major updates reflected in this book. I have modified all form input to use the safer filter_input mechanism, and all database connectivity now uses the PDO library.
  • Enhanced jQuery coverage: jQuery has become even more important as a utility library than it was before. The coverage updates some of the nice new features of this library.
  • A new mobile chapter: Mobile web development is increasingly important. I provide a new chapter with tips on making your pages mobile-friendly, including use of the jQuery mobile library and building responsive designs that automatically adjust based on screen size.
  • Support for the WebsiteBaker CMS: I use this CMS quite a bit in my web business, and I find it especially easy to modify. I changed Book VIII, Chapter 3 to explain how to use and modify this excellent CMS.
  • Various tweaks and improvements: No book is perfect (though I really try). There were a few passages in the previous edition that readers found difficult. I tried hard to clean up each of these areas. Many thanks to those who provided feedback!

Icons Used in This Book

This is a For Dummies book, so you have to expect some snazzy icons, right? I don't disappoint. Here's what you'll see:

tip.eps This is where I pass along any small insights I may have gleaned in my travels.

technicalstuff.eps I can't really help being geeky once in a while. Every so often, I want to explain something a little deeper. Read this to impress people at your next computer science cocktail party or skip it if you really don't need the details.

remember.eps A lot of details are here. I point out something important that's easy to forget with this icon.

warning.eps Watch out! Anything I mark with this icon is a place where things have blown up for me or my students. I point out any potential problems with this icon.

Beyond the Book

You can find additional features of this book online. Visit the web to find these extras:

  • Companion website:www.aharrisbooks.net/haio

    This is my primary site for this book. Every single example in the book is up and running on this site so you can see it in action. When necessary, I've also included source code so you can see the source code of anything you can't look at with the ordinary View Source command. I've also posted a link to every piece of software that I mention in the book. If you find any example is not working on your site, please come to my site. If there was a problem with an example in the book, I'll update the site right away, so check my site to compare your code to mine. I also have links to my other books, a forum where you can ask questions, and a form for emailing me any specific questions you might have.

  • Cheat Sheet: Go to www.dummies.com/cheatsheet/html5css3aio to find this book's Cheat Sheet. Here, you can find primers on selected HTML syntax, CSS attributes, JavaScript syntax, and MySQL commands.
  • Dummies.com online articles: Go to www.dummies.com/extras/html5css3aio to find the Extras for this book. Here you can find articles on topics such as using HTML entities, resetting and extending CSS, JavaScript libraries, using templates with PHP, SQLite and alternative data strategies, fun with jQuery plug-ins, and what's next for the web.
  • Updates: For Dummies technology books sometimes have updates. To check for updates to this book, go to www.dummies.com/extras/html5css3aio.

Where to Go from Here

Well, that's really up to you. I sincerely believe you can use this book to turn into a top-notch web developer. That's my goal for you.

Although this is a massive book, there's still more to figure out. If you have questions or just want to chat, feel free to e-mail me at [email protected]. You can also visit my website at www.aharrisbooks.net/ for code examples, updates, and other good stuff.

I try hard to answer all reader e-mails, but sometimes I get behind. Please be patient with me, and I'll do my best to help.

I can't wait to hear from you and see the incredible websites you develop. Have a great time, discover a lot, and stay in touch!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset