Adding css in html

I have linked the CSS file in my html code, but it is not making any changes in the website. Please help me.

@pujitharoopa it may be a path issue. Can you please share your folder structure and code?

<!DOCTYPE html>  
   	<title>Learning html</title>
   	<link rel="stlyesheet" type="text/css" href="coffeeshop.css">
   	<div class ="available-coffee out-of-stack" id="mocha">
         <img src="mocha.webp" class="div-img">
   	<div class="available-coffee in-stack">
         <img src="cappuccino.webp" class="div-img">
	height: 300px;
	width: 300px;
	border: 2px dotted red;

	border: 4px double green;

	height: 80%;
	width: 100%;

@pujitharoopa is the html and css file in the same folder? If possible, please share a screenshot of these files open in a code editor.

check if both files are in same folder or the name you have linked in the href attribute has no spelling mistake .If the css file is in different folder then copy the relative path of it or root path (relative path recommended) and then paste it in href of your link tag.

1 Like