Part I
Getting to Know (X)HTML and CSS
In this part . . .
Here, we explore and explain basic HTML document links and structures. We also explain the role that Web browsers play in delivering all this stuff to peopleâs desktops. We even explain where the (X) comes from â namely, a reworking of the original description of HTML markup using XML syntax to create (X)HTML â and go on to help you understand what makes (X)HTML different (and possibly better, according to some) than plain old HTML. We also look at general Web page anatomy, the various pieces and parts that make a Web page, and how CSS helps manage their presentation, placement, and even color when they appear on somebodyâs display.
Next, we take you through the exercise of creating and viewing a simple Web page so you can understand whatâs involved. We also explain making changes to an existing Web page and how to post your changes (or a new page) online.
This part concludes with a rousing exhortation to figure out what youâre doing before making too much markup happen. A well built house starts with a set of blueprints and architectural drawings, and a Web page (and site) should start with a plan or a map, too, with some idea of where your pages will reside in cyberspace and how hordes of users can find their way to them.
Chapter 1
The Least You Need to Know about HTML, CSS, and the Web
In This Chapter
Creating HTML in text files
Serving and browsing Web pages
Understanding links and URLs
Understanding basic HTML syntax
Understanding basic CSS
Welcome to the wonderful world of the Web, (X)HTML, and CSS. With just a little knowledge, some practice, and something to say, you can build your own little piece of cyberspace or improve on existing work.
Youâll notice we use (X)HTML throughout this book. This is an acronym we made up to stand for âeither HTML or XHTML,â where HTML is Hypertext Markup Language, and XHTML is Extensible Hypertext Markup Language. Although HTML and XHTML arenât exactly identical, theyâre enough like each other for this reference to make sense. This book is your down-and-dirty guide to understanding Web documents, sprucing up an existing page, or creating complex and exciting pages that integrate intricate designs, multimedia, and scripting.
The best way to start working with HTML is to jump right in, so thatâs what this chapter does: It brings you up to speed on the basics of how (X)HTML and CSS work behind the scenes inside Web pages, introducing you to their underlying building blocks. When youâre done with this chapter, youâll know how (X)HTML and CSS work so you can start creating or editing Web pages right away.
Web Pages in Their Natural Habitat
Web pages can accommodate many kinds of content, such as text, graphics, forms, audio and video files, and even interactive games.
Browse the Web for only a moment, and you see a buffet of information and content displayed in many ways. Every Web site is different, but most have one thing in common: the Hypertext Markup Language (also known as HTML). Youâll also run into Extensible Hypertext Markup Language (XHTML) and Cascading Style Sheets (CSS) pretty regularly, too.
Whatever information a Web page contains, every Web page is created using HTML (or some reasonable facsimile). HTML is the mortar that holds Web pages together; graphics, content, and other information are the bricks; CSS tells Web pages how they shou...