Wednesday, 4 July 2012

An Introduction to HTML And Internet Basics

Are you interested in building your own Web pages? In this HTML tutorial, I would like to introduce you 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.

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 communicates on the Internet is by publishing and interacting with Web pages. You can also use the Internet to send and receive e-mail, chat with other users, and transfer files between
computers.

The World Wide Web
The World Wide Web is a giant collection of documents, or pages, stored on computers around the globe. Commonly called the Web, this collection of pages represents a wealth of text, images, audio, and video available to anyone with a computer and an Internet connection. Web pages are stored on servers, which are Internet-connected computers running software that allows them to serve up information to other computers. When you place a text file, image, or other document in a special Web directory on a server, that information is available for other Web users to view.
HTML And Internet

Browsers
A Web browser is software that allows you to view and interact with Web pages. When you type a URL or click a link in a Web browser, the browser retrieves the appropriate page from a server on the Internet and displays that page. Microsoft Internet Explorer, Mozilla Firefox, and Apple Safari are the three most popular browsers in use today. Each program has evolved through a number of versions, with newer versions supporting more recent Web features. As you build your pages using HTML code, remember that different browsers may display your pages slightly differently depending on the version.

An Introduction to HTML
You 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 .htm file extensions.

HTML Tags
HTML consists of text interspersed with special instructions known as tags. Surrounded by brackets, < >, HTML tags tell a browser how to organize and present text, images, and other Web page content. Many tags are written using an opening tag and a closing tag that surround content that appears on the page. When writing HTML tags, you can use upper- or lowercase letters. To make the coding easy to distinguish from other text in the page, you can type tag names in uppercase. For details, see the section “Understanding HTML Syntax.”

Rendering HTML
When a browser displays a Web page, it retrieves the HTML file for that page from a server, parses the HTML tags to determine how the content should be formatted, and renders the page. The HTML tags tell the browser what images, video, audio, and other content need to be downloaded and integrated into the page. The HTML may also tell the browser to download style sheets and interactive scripts to further enhance the page. To view the HTML underlying a Web page, see the section “View HTML Code in a Browser.”

HTML Standards
The World Wide Web Consortium, or W3C, is the primary group guiding the evolution of the HTML language. The W3C is made up of hundreds of companies and organizations including Web industry leaders such as Microsoft, Apple, and Google. The standards developed by the W3C give developers of Web servers and browsers a set of common guidelines with which to develop their products. You can visit the W3C’s Web site at www.w3.org.

HTML Versions
The most recent version of HTML is 4.01. Version 4.01 includes rules for using more than 90 HTML tags, most of which are covered in this book. It improves on previous versions by adding better support for multimedia, scripting, and style sheets. Support for style sheets is especially important because it allows developers to apply more precise formatting to Web pages. It also allows developers to keep complex styling information separate from the rest of the HTML.

XHTML
XHTML, or Extensible HyperText Markup Language, is an alternative language for coding Web pages that conforms to the stricter standards of XML, or Extensible Markup Language. XHTML is tag-based and uses many of the same tags as in HTML. However, in XHTML, all tags must be closed, tag names and attributes must be coded in lowercase, and attribute values for tags must be surrounded by quotes. Most modern browsers can read both HTML and XHTML. Although XHTML is not covered in this book, you can read more about it at the W3C site at
www.w3.org.

Next Generation of HTML
As this book is being published, the W3C is developing the specification for HTML 5, the next version of HTML. This version will introduce features to help Web designers more easily create and maintain the dynamic pages seen in many of today’s Web sites. HTML 5 will include tags for defining headers, footers, and navigation sections, along with tags for adding interactive elements such as editable and sortable tables.

HTML Editors
HTML editors, such as Adobe Dreamweaver and Microsoft Expression, are dedicated programs for writing HTML code and managing Web pages. These programs can shield you from having to write HTML code by offering a graphical environment for building Web pages as well as a text-based environment. Most HTML editors will also color your HTML tags for easier viewing, validate your code, and help you upload finished pages to a server.

Writing HTML Code
In HTML, tags determine how page content is organized and formatted. Tags consist of words or abbreviations surrounded by angle brackets, < >. Tags can be written using upper- or lowercase letters. You can type tag names in uppercase to distinguish the code from other text. This HTML code creates a paragraph in your page:
<P>Hello, world!</P>

Tag Structure
Certain structural HTML tags identify different parts of your HTML document. For example, the <BODY> and </BODY> tags surround the main body content that appears in the browser window. Many tags, such as the paragraph tags (<P> and </P>), are written using an opening tag and a closing tag while others, such as the image tag (<IMG>), stand alone. Closing tags must always include a slash (/) before the tag name.

Attributes and Values
You can assign specific attributes to each HTML tag to customize its behavior. Most attributes work by setting a numeric or descriptive value. For example, you can set a paragraph’s alignment on the page using the ALIGN attribute along with a type of alignment: left, right, or center. The code for creating a centered paragraph looks like this:

<P ALIGN=”center”>My centered text.</P>

Attributes always go inside the opening HTML tag, and it is good form to enclose attribute values in quotation marks.

Entities
You can add special characters to a page, such as a copyright symbol or a fraction, by using special codes called entities. Entities represent characters not readily available on the keyboard. All entities are preceded by an ampersand (&) and followed by a semicolon (;). For example, the following code adds a copyright symbol to your page:
&copy;

Avoiding Syntax Errors
To avoid HTML errors, always take the time to proofread your code. Most HTML editors have features that highlight bad syntax. Make sure your tags have brackets, your closing tags include a slash, and your attribute values are surrounded by quotation marks. Multiple HTML tags should be properly nested, meaning your closing tags should be in the reverse order of the opening tags.
For example:

<P ALIGN=”center”><B>My text.</B></P>

To help make your HTML readable, consider using new lines to type code instead of running everything together on one long line. Doing so will not affect how your page is displayed, because Web browsers ignore extra white space.

0 Responses to “An Introduction to HTML And Internet Basics”

Post a Comment

Hi Readers!

Please give your valuable responses and suggestions.