HTML and CSS Reference
In-Depth Information
Figure 1-1. A sample run of Hello.htm
Although constructing this web page isn't rocket science, it throws light on some interesting things.
First, look at the <!DOCTYPE> declaration in Listing 1-1: it tells you that this document is an HTML
document. Notice that there is no mention of the HTML version in the DOCTYPE . That means even if new
features are added to HTML in the future (and they undoubtedly will be) the document is still an HTML
document and not an HTML4 or HTML5 document. Compare this simple DOCTYPE declaration with the
following pre-HTML5 declaration:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “
The complex DOCTYPE declaration is reduced to a simple form in HTML5.
Listing 1-1 includes properly nested markup tags such as <head> , <title> , and <h1> . However, HTML5
and web browsers forgive most nesting errors, just like old HTML. Of course, as a good practice you should
follow the guidelines of well-formed and -structured markup.
In the preceding example, you used a text editor to create Hello.htm . As an ASP.NET developer, you
probably use Visual Studio or Visual Studio Express for Web to develop your web pages. Luckily, these tools
understand and support HTML5 markup. Figure 1-2 shows the Options dialog in Visual Studio, where you
can configure the relevant settings.
Figure 1-2. Options dialog in Visual Studio
Search WWH ::

Custom Search