Chapter 1. HTML, XHTML, and the World Wide Web


Chapter 2. Quick Start


2.2. A First HTML Document
<html>
<head>
<title>My first HTML document</title>
</head>
<body>
<h2>My first HTML document</h2>
Hello, <i>World Wide Web!</i>
<!– No “Hello, World” for us –>
<p>
Greetings from<br>
<a href=”http://www.ora.com”>O’Reilly & Associates</a>
<p>
Composed with care by:
<cite>(insert your name here)</cite>
<br>&copy;2000 and beyond
</body>
</html>

223

2.12. Style Sheets and JavaScript
<html>
<head>
<title>CSS Example</title>
<!– Hide CSS properties within comments so old browsers
don’t choke on or display the unfamiliar contents. –>
<style type=”text/CSS”>
<!–
H1 {color: red}
–>
</style>
</head>
<body>
<H1>I’ll be red if your browser supports CSS</H1>
Something in between.
<H1>I should be red, too!</H1>
</body>
</html>

2121