Chapter 1. Getting Familiar with Web Pages

Are you interested in building your own Web pages? This chapter introduces you to the Internet, where Web pages are stored and accessed, and to HTML, the language used to create Web pages. It also explains the basics behind HTML editors and Web browsers, which you use to design and view your Web content.

With a Web browser, you can view the HTML for any page on the Web and save the HTML to your computer. This can serve as a starting point for creating your pages.

Later chapters cover writing HTML to create your Web pages from scratch as well as using online services to set up blogs, social-network pages, and more.

Getting Familiar with Web Pages

Internet Basics 4

An Introduction to HTML 6

Explore Web Browsers 8

Explore HTML Editors 9

Understanding HTML Syntax 10

View HTML Code in a Browser 12

Internet Basics

The Internet is a worldwide collection of interconnected computer networks that enables businesses, organizations, governments, and individuals to communicate in a variety of ways. One of the most popular ways users communicate on the Internet is by publishing and interacting with Web pages. You can create Web pages from scratch using HTML or set them up using various online services. You can also use the Internet to send and receive e-mail, chat with other users, and transfer files between computers.

The Internet began as a military research project in the late 1960s. In 2008, the number of Internet users around the globe topped 1.6 billion.

An Introduction to HTML

You can build Web pages using HTML, which is short for Hypertext Markup Language. HTML documents are made up of text content and special codes known as tags that tell Web browsers how to display the content. HTML documents are identified by their.html or or .htm file extensions. You can edit the code in an HTML document by opening the document in a text editor.

For the most part, HTML is platform independent, which means you can view Web pages on any computer operating system, including Windows, Mac, and Linux.

Explore Web Browsers

A Web browser is software that can retrieve HTML documents from the Web, parse the HTML instructions, and display the resulting Web pages. In addition to retrieving the HTML, the browser takes care of downloading all the associated images, style sheets, scripts, and other information needed for the page to appear and function properly.

You can also use a browser to display HTML documents you save locally on your computer. When coding your HTML, you can use a Web browser to test your work.

Explore HTML Editors

Because HTML documents are plain-text documents, you can use any text-editing program to code HTML and create a Web page. All computer operating systems come with some sort of text editor installed. You can also use a variety of Web-specific coding environments that write your HTML code, validate it, and upload it to a Web server. Higher-end editing tools help you write style sheets, scripts, and other types of code in addition to HTML.

Understanding HTML Syntax

HTML is a language for describing Web page content. HTML rules, or syntax, govern the way in which code is written and how Web browsers interpret it. HTML with incorrect syntax can result in words, images, and other elements on your Web page showing up in unexpected places or not at all. It can also result in your pages appearing differently in different Web browsers. Learning the correct way to write your code can save you time and confusion later and ensure that Web users see your pages as you intended them to be seen.

View HTML Code in a Browser

You can view the HTML code for any Web page that you have loaded into your Web browser. Viewing HTML from different Web sites is a good way to learn how to write your own code and can spawn new ideas for your own pages. You can also save a Web page locally for use as a template or to study later.

In Microsoft Windows Vista, Internet Explorer opens the HTML code in the Notepad text editor. To view an HTML page that you have saved locally, see Chapter 2.

View HTML Code in a Browser

VIEW THE SOURCE CODE

  • VIEW THE SOURCE CODE
  • VIEW THE SOURCE CODE
  • VIEW THE SOURCE CODE

    A Notepad window appears displaying the HTML source code for the page.

  • VIEW THE SOURCE CODE

    The window closes.

VIEW THE SOURCE CODE

SAVE THE SOURCE CODE

  • SAVE THE SOURCE CODE
  • SAVE THE SOURCE CODE
    SAVE THE SOURCE CODE

    The Save As dialog box appears.

  • SAVE THE SOURCE CODE
  • SAVE THE SOURCE CODE

    HTML pages must have an .html or .htm file extension to display correctly in a browser.

  • SAVE THE SOURCE CODE

    Notepad saves the page.

Note

Will the HTML documents that I save to my computer work when I open them in a browser?

Possibly. It depends on how the HTML is coded. In addition to the HTML, you may have to download images, style sheets, scripts, and other external content separately and then edit the HTML so that the page references them correctly. For more about referencing content using absolute and relative links, see Chapter 6.

How else can I save a Web page in my browser?

In Internet Explorer, you can click File and then Save As. The browser gives you several ways to save your page. Complete saves the HTML and embedded content, HTML Only saves just the HTML, and Web Archive saves the HTML and other content as a single file.

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

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