Why is it that the style is not working? why?

<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 coffee from mexico,Oblivia and Guatemala</p>
		
		<h2>Mocha Coffee Latter , $2.96</h2>
		<p>EsPresso, Steamed milk and Chocolate chip</p>
		
		<h2>Capuccino , $1.07</h2>
		<p>A mixture of Espresso, steamed milk and foam</p>
		
		<h2>Chai Tea , $2.59</h2>
		<p> A spicy drink with black tea, spices, milk and honey</p>
		
	</body>
	
</html>

hi chiiqui,
Your code is correct, some times this will happen in editors
just replace this code in ur version of code it will work

<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>

What exactly is not working about it? You dont give enough information to make give an solution.

why dont you edit <style type="text/css" > this line manually ..ofcourse this will solve your problem..i cheked in my browser. i did copy and paste your code to my notepad and save it as .html extension. when i open the file in browser no result was showing. but inlice css commands were working. But when i edit <style type="text/css" > line manually without copy and paste it works..dont know how :D anyway problem solved :D

Hi, your code is good and it works for me. Nothing wrong in it.

The problem basically occur because some of the editor will replace ' with ` which trigger the event

hey i have checked to your code, This is working fine on my server. May be you have some problem in your server or be can you please describe more about problem ?

<style type=”text/css”>

This code snippet is using ' ”' instead of ' " '. Yes, it's a subtle difference, but it's wrong. (lps pointed this out as well.) You need a true text editor that won't substitute quotes on you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.