30.07.2013 Views

Visual Basic.NET How to Program (PDF)

Visual Basic.NET How to Program (PDF)

Visual Basic.NET How to Program (PDF)

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1348 Introduction <strong>to</strong> HyperText Markup Language 4: Part 1 Appendix H<br />

ple. In subsequent examples, we also include comments in the markup, especially when we<br />

introduce new features.<br />

Every HTML document contains a head element, which generally contains information<br />

about the document, and a body element, which contains the page content. Information<br />

in the head element is not generally rendered in the display window, but may be made<br />

available <strong>to</strong> the user through other means. Lines 8–10<br />

<br />

<strong>Visual</strong> <strong>Basic</strong> .<strong>NET</strong> <strong>How</strong> <strong>to</strong> <strong>Program</strong> - Welcome<br />

<br />

show the head element section of our Web page. Including a title element is required<br />

for every HTML document. To include a title in your Web page, enclose your chosen title<br />

between the pair of tags … in the head element.<br />

Good <strong>Program</strong>ming Practice H.5<br />

Use a consistent title-naming convention for all pages on your site. For example, if your site<br />

is called “Al’s Web Site,” then the title of your links page might best be “Al’s Web Site -<br />

Links”. This practice presents a clearer picture <strong>to</strong> those browsing your site. H.5<br />

The title element names your Web page. The title usually appears on the colored<br />

bar at the <strong>to</strong>p of the browser window, and also will appear as the text identifying your page<br />

if a user adds your page <strong>to</strong> their list of Favorites or Bookmarks. The title is also used by<br />

search engines for cataloging purposes, so picking a meaningful title can help search<br />

engines direct a more focused group of people <strong>to</strong> your site.<br />

Line 12<br />

<br />

opens the body element. The body of an HTML document is the area where you place the<br />

content of your document. This includes text, images, links and forms. We discuss many<br />

elements that can be inserted in the body element later in this appendix. Remember <strong>to</strong> include<br />

the end tag before the closing tag.<br />

Various elements enable you <strong>to</strong> place text in your HTML document. We see the paragraph<br />

element on line 14<br />

Welcome <strong>to</strong> Our Web Site!<br />

All text placed between the … tags forms one paragraph. Most Web browsers<br />

render paragraphs as set apart from all other material on the page by a line of vertical space<br />

both before and after the paragraph. The HTML in line 12 causes Internet Explorer <strong>to</strong> render<br />

the enclosed text as shown in Fig. H.1.<br />

Our code example ends on lines 16 and 17 with<br />

<br />

<br />

These two tags close the body and HTML sections of the document, respectively. As discussed<br />

earlier, the last tag in any HTML document should be , which tells the<br />

browser that all HTML coding is complete. The closing tag is placed before the<br />

tag because the body section of the document is entirely enclosed by the HTML<br />

section. Therefore, the body section must be closed before the HTML section.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!