Introduction

Hypertext Markup Language (HTML) is the basic programming language of the World Wide Web. It’s the common thread that ties together virtually every website, from large-scale corporate sites like Microsoft’s to single-page classroom projects at the local grade school.

In simple terms, a webpage (or HTML document) is a plain text file that has been encoded using HTML so that it appears nicely formatted in a web browser. Here’s what HTML means, word-by-word:

  • Hypertext Text that you click to jump from document to document. This is a reference to the ability of webpages to link to one another.

  • Markup Tags that apply layout and formatting conventions to plain text. Literally, the plain text is “marked up” with the tags.

  • Language A reference to the fact that HTML is considered a programming language.

Don’t let the phrase “programming language” intimidate you. Creating a webpage with HTML is much simpler than writing a computer program in a language like Microsoft Visual Basic or C++. You can create a simple webpage in just a few minutes.

Tip

When people think of computer programming, they usually think of writing a compiled program. A compiled programming language runs the human-readable programming code through a utility that converts it to an executable file (usually with an .exe or .com extension), which is then distributed to users. In contrast, HTML is an interpreted programming language. That means the program is distributed in human-readable format to users, and the program in which it is opened takes care of running it. The HTML code for webpages resides in files. Each time your web browser opens a webpage, it processes the HTML code within the file.

This book teaches beginner-level HTML in a rather fundamentalist way: by creating plain text files in Notepad. There are so many good website creation programs on the market nowadays that you may be wondering why this book takes this approach.

Simply put, it’s because doing your own coding is the best way to learn HTML. In this book you’ll build a website from the ground up, writing every line of code yourself. It’s slower and not as much fun as a fancy graphical program, but it’s great training.

The last chapter of this book shows how to use Microsoft Expression Web to create web content, and you may eventually choose to move to a program like that. However, you will be a much better web designer—and understand what is going on in design programs much better—if you tough it out with Notepad in the beginning.

Who Should Read This Book

This book is designed for non-programmers who are brand-new to HTML. It doesn’t assume any previous web design or programming knowledge of any kind, so it’s perfect for home hobbyists and self-educators, as well as high school and college classrooms.

Assumptions

This book expects that you have basic computer literacy skills and you can use the operating system on your PC. The detailed procedures for this book were written with Windows developers in mind, but the general information applies to building webpages on any operating system. You should know how to manage files, run programs, and access the Internet.

I’m also assuming that if you’re reading this book, you are actually interested in learning HTML and not just knocking out a quick webpage only to never think about HTML again. This book provides you with a solid foundation in HTML that you’ll be able to draw from for years to come.

Who Should Not Read This Book

This book is not for experienced programmers who already have significant HTML knowledge and are just interested in updating their skills for HTML5. This book doesn’t cover many of HTML5’s advanced features that experienced web developers are likely to be interested in learning about; instead, it provides a solid foundation for the beginner.

Organization of This Book

This book is divided into three sections, each of which focuses on a different aspect of webpage development. Part I, explains how HTML works and helps you set up the structure of a page and place basic text elements on it such as headings, paragraphs, and lists. Part II, explains how to use cascading style sheets (CSS) to apply formatting to a page or a group of pages and how to include graphic elements on a page. Part III, explains how to create intuitive page layouts and navigational aids as well as how to add special elements such as forms and multimedia.

Conventions and Features in This Book

This book presents information using conventions designed to make the information readable and easy to follow.

  • Each exercise consists of a series of tasks, presented as numbered steps (1, 2, and so on) listing each action you must take to complete the exercise.

  • Boxed elements with labels such as “Note” provide additional information or alternative methods for completing a step successfully.

  • Text that you type displays in boldface. For example, if you are instructed to type some text to an existing block of code, the text you are to type is displayed in bold.

  • Glossary terms marked in the text are explained in the glossary at the end of the book.

System Requirements

You will need the following hardware and software to complete the practice exercises in this book:

  • A computer running the operating system of your choice. The examples in this book use Windows 8, but you can use any Windows, Mac, Linux, or UNIX operating system.

  • A text-editing program. The examples in this book use Notepad, which comes with all Windows versions.

  • One or more web browsers. The examples in this book use Internet Explorer 10. You will probably want at least one other browser in which to check your work, because different browsers might display content in different ways.

  • An Internet connection to download the practice files.

Code Samples

Each chapter includes exercises that let you interactively try out new material learned in the main text. All files you will need to complete these exercises can be downloaded from the following page:

Follow the instructions to download the 9780735669826_files.zip file.

Installing the Code Samples

Follow these steps to install the code samples on your computer so that you can use them with the exercises in this book.

  1. Unzip the 9780735669826_files.zip file that you downloaded from the book’s website (name a specific directory along with directions to create it, if necessary).

  2. If prompted, review the displayed end user license agreement. If you accept the terms, select the accept option and then click Next.

Note

If the license agreement doesn’t display, you can access it from the same webpage from which you downloaded the 9780735669826_files.zip file.

Using the Code Samples

The folder created by the Setup.exe program contains subfolders for each chapter. Within a chapter’s folder are additional subfolders that hold the files for each exercise. Each time you begin an exercise, make sure that you are using the files provided specifically for that exercise.

Each chapter folder contains a _Solutions subfolder, which contains samples of the finished files for that chapter’s exercises. You can use these to check your work.

Acknowledgments

Thank you to my editorial team at O’Reilly for a job well done, including Russell Jones (Acquisitions/Development), John Mueller (Technical Editor), Jeff Riley (Copy Editor), and Melanie Yarbrough (Production Editor). It is a pleasure to work with a professional team of editors who make the complex process of producing a book go as smoothly as possible.

Errata & Book Support

We’ve made every effort to ensure the accuracy of this book and its companion content. Any errors that have been reported since this book was published are listed on our Microsoft Press site at oreilly.com:

If you find an error that is not already listed, you can report it to us through the same page.

If you need additional support, email Microsoft Press Book Support at .

Please note that product support for Microsoft software is not offered through the addresses above.

We Want to Hear from You

At Microsoft Press, your satisfaction is our top priority, and your feedback our most valuable asset. Please tell us what you think of this book at:

The survey is short, and we read every one of your comments and ideas. Thanks in advance for your input!

Stay in Touch

Let’s keep the conversation going! We’re on Twitter: http://twitter.com/MicrosoftPress

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

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