目录
HTML(HyperText Markup Language)
Starbuzz Coffee Beverages with style
-
HTML(HyperText Markup Language)
-
CSS(Cascading Style Sheets)
-
Hello World!
<html>
<head>
<title>Head First Lounge</title>
</head>
<body>
<h1>Welcome to the Head First Lounge</h1>
<img src="drinks.gif">
<p>
Join us any evening for refreshing elixirs,
conversation and maybe a game or
two of <em>Dance Dance Revolution</em>.
Wireless access is always provided;
BYOWS(Bring your own Web server).
</p>
<h2>Direction</h2>
<p>
You'll find us right in the center of
downtown Webville.Come join us!
</p>
</body>
</html>

-
Starbuzz Coffee Beverages
<html>
<head>
<title>Starbuzz Coffee Beverages</title>
</head>
<body>
<h1>Starbuzz Coffee Beverages</h1>
<h2>House Blend,$1.49</h2>
<p>A smooth,mild blend of coffees fromMexico,
Bolivia and Guatemala.</P>
<h2>Mocha Cafe Latte,$2.35</h2>
<p>Espresso,steamed milk and chocolate syrup.</P>
<h2>Cappuccino,$1.89</h2>
<p>A mixture of espresso,milk and foam.</P>
<h2>Chai Tea,$1.85</h2>
<p>A spicy drink made with black tea,spices,milk and
honey.</P>
</body>
</html>
-
Starbuzz Coffee Beverages with style
<html>
<head>
<title>Starbuzz Coffee Beverages</title>
<style type="text/css">
body {
background-color:#d2b48c;
margin-left:20%;
margin-right:20%;
border:2px dotted black;
padding:10px 10px 10px 10px;
font-family: sans-serif;
}
</style>
</head>
<body>
<h1>Starbuzz Coffee Beverages</h1>
<h2>House Blend,$1.49</h2>
<p>A smooth,mild blend of coffees fromMexico,
Bolivia and Guatemala.</P>
<h2>Mocha Cafe Latte,$2.35</h2>
<p>Espresso,steamed milk and chocolate syrup.</P>
<h2>Cappuccino,$1.89</h2>
<p>A mixture of espresso,milk and foam.</P>
<h2>Chai Tea,$1.85</h2>
<p>A spicy drink made with black tea,spices,milk and
honey.</P>
</body>
</html>
-
相对路径
<!--
目录结构
root
|-index.html
|-images
| |-a.jpg
|-about
| |-b.html
|-others
| |-else
| |-c.html
-->
<!--当前目录访问子目录-->
<html>
<head>
<title>index</title>
</head>
<body>
<img src="images/a.jpg">
<a href="about/b.html">To b.html!</a>
<a href="others/else/c.html">To c.html!</a>
</body>
</html>
<!--子目录访问父目录-->
<html>
<head>
<title>b</title>
</head>
<body>
<img src="../images/a.jpg">
<a href="../index.html">To index.html!</a>
<a href="../others/else/c.html">To c.html!</a>
</body>
</html>
<!--多级子目录访问多级父目录-->
<html>
<head>
<title>c</title>
</head>
<body>
<img src="../../images/a.jpg">
<a href="../../index.html">To index.html!</a>
<a href="../../about/b.html">To b.html!</a>
</body>
</html>
-
<q>和<blockquote>
<blockqute>是一个块(block)元素,而<q>是一个内联(inline)元素。块元素显示时前后各有一次换行,而内联元素在文本流中总在行内出现。
-
void元素
空元素,如<br>、<img>
-
字符实体
如,<为<,>为>,&为&,©为©right