Datasheet
During the processing of the page, three important areas can influence the way the page eventually ends
up in the browser:
❑ Static text. Any static text, like HTML, CSS, or JavaScript code you place in a page, is sent to the
browser directly. You learn more about HTML, CSS, and JavaScript in this and subsequent chap-
ters, including Chapter 3, which gives you a detailed look at CSS.
❑ ASP.NET server controls. These controls are placed in your ASPX page and when they are
processed, they emit HTML that is inserted in the page. You’ll learn more about server controls
after the discussion of HTML in this chapter, and Chapter 4 is devoted entirely to ASP.NET
server controls.
❑ Programming code. You can embed code, like Visual Basic .NET or C#, directly in a page, as you
saw in the previous Try It Out. In addition, you can place code in a separate code file, called a
Code Behind file. This code can be executed by the runtime automatically, or based on a user’s
action. Either way, execution of the code can greatly influence the way the page is displayed, by
accessing databases, performing calculations, hiding or showing specific controls, and much
more. Programming your ASP.NET web pages is discussed in great detail in Chapter 5.
Once the page is done processing, and all the HTML for the page has been collected, it is sent back to the
browser. The browser then reads this HTML, parses it and, finally, displays the page for you to look at.
Since HTML is so critical for displaying web pages, the next section gives you an overview of HTML.
Understanding HTML
HTML is the de facto language for creating web pages and is understood by every web browser that exists
today. Since the beginning of the ’90s it has been the driving force of the World Wide Web, the part of the
Internet that deals with web pages. HTML documents are simple text files that contain markup, a combina-
tion of text, and additional data that influences that text.
HTML Elements
HTML uses angle brackets to indicate how your content should be rendered (or displayed) in the browser.
The angle brackets are referred to as tags; a pair of tags holding some text is referred to as an element. Take
another look at the HTML you saw in the previous Try It Out where you opened the source window for
the page in the browser:
<h1>Hello World</h1>
<p>Welcome to Beginning ASP.NET 3.5 on 11/1/2007 5:03:39 PM</p>
The first line of this example contains an <h1> element with an opening tag (<h1>) and a closing tag
(
</h1>). This element is used to signify a heading at level one. Notice how the element is closed with a
similar tag, but with an additional forward slash (/) in it:
</h1>. Any text between these opening and
closing tags is considered part of the element, and is thus rendered as a heading. In most browsers, this
means the text is rendered in a larger font. Similar to the
<h1> tag, there are tags for creating headings
up to level six, such as
<h2>, <h3>, and so on.
10
Chapter 1: Getting Started with ASP.NET 3.5
87593c01.qxd:WroxPro 1/25/08 9:05 AM Page 10