代码示例:
index.html
<!DOCTYPE html>
<html>
<head>
<title>Animals Around the World</title>
<link href="style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h1>The Brown Bear</h1>
<!-- A section that describes the brown bear -->
<p>The brown bear (Ursus arctos) is native to parts of northern Eurasia and North America. Its conservation status is currently "Least Concern." There are many subspecies within the brown bear species, including the Atlas bear and the Himalayan brown bear.</p>
<a href="https://en.wikipedia.org/wiki/Brown_bear">Learn More</a>
<p>Here are some bear species:</p>
<ul>
<li>Arctos</li>
<li>Collarus</li>
<li>Horribilis</li>
<li>Nelsoni (extinct)</li>
</ul>
<p>The following countries have the largest populations of brown bears:</p>
<ol>
<li>Russia</li>
<li>United States</li>
<li>Canada</li>
</ol>
<a href="https://en.wikipedia.org/wiki/Brown_bear" target="_blank">
<img src="https://s3.amazonaws.com/codecademy-content/courses/web-101/web101-image_brownbear.jpg" /></a>
</body>
</html>
style.css
h1 {
color:FireBrick;
}
p {
font-size:18px;
}
h1,p {
color:DarkSlateGray;
}
/*explaining*/
* {
font-family:Georgia;
}