Click here to Skip to main content
15,880,469 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm trying to make a website for my little "Business" (not actually a business).
for the header I've put a logo, as well as using embedded CSS made a background colour for my header, but when I go to view it in my web browser it just shows a blank page, not even the alt text I put in the img tag. my main problem is where should an image be on my computer to be inserted into the HTML document or how I should format the tag. additionally, it would be nice to know if I'm doing anything wrong with the CSS. Thank you in advanced.

What I have tried:

I've tried this
HTML
<html>

	<head>

	<title>Deep Ocean Entertainment Canada</title>
	
	<style>
		.header{
			
			Background-color:#3939A5;
			
		}
	</head>
	<body>
		<div class=header>
		<img src="DOEC_logo.png" alt="DOEC" />
		
		</div>
	</body>

</html>
Posted
Comments
F-ES Sitecore 23-Mar-20 7:28am    
Are you using a web server or are you opening the html file in the browser from the file system?
HTMLPuppy 25-Mar-20 13:02pm    
I'm opening the file with safari. Does that answer your question?
F-ES Sitecore 25-Mar-20 13:59pm    
Put the image in the same folder as the html page.
ZurdoDev 23-Mar-20 7:38am    
Since your src attribute only has a file name it needs to be in the same folder as the html file.

Common convention would be to create a subfolder named images and then your src attribute would be "images\DOEC_logo.png".
HTMLPuppy 25-Mar-20 13:02pm    
ok thank you

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900