I just started reading HeadFirst HTML and CSS book. In the following example code in the book, the CSS styling in HTML code is not getting applied when I view it in IE/Firefox/Chrome.
<html>
<head>
<title>Starbuzz Coffee</title>
<style type=”text/css”>
body {
background-color: #d2b48c;
margin-left: 20%;
margin-right: 20%;
border: 1px dotted gray;
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 from Mexico, Bolivia and
Guatemala.</p>
<h2>Mocha Caffe Latte, $2.35</h2>
<p>Espresso, steamed milk and chocolate syrup.</p>
<h2>Cappuccino, $1.89</h2>
<p>A mixture of espresso, steamed milk and milk foam.</p>
<h2>Chai Tea, $1.85</h2>
<p>A spicy drink made with black tea, spices, milk and honey.</p>
</body>
</html>
Can you please comment why it's not working as expected. Though I downloaded a file index.html from internet with same code as above and it was giving expected output.
Thanks,
Aucun commentaire:
Enregistrer un commentaire