My image wont load up on page? I am not sure what is going on here, i have made many websites uptil now, but I think i made a mistake in my code. I am trying to load up this image, but it wont! :c
Here is the code:
<!DOCTYPE html>
<html>
<head>
<title>Error 404</title>
</head>
<body>
<h1>Oops!</h1>
<p>What you have just encountered is Error 404. This means that the page you were trying was not found. Try checking the <abbr title="Uniform Resource Locator">URL</abbr> for any mistakes. Even a small typo counts.</p>
<p>If that doesn't work, we have provided a map of the site below. Click on anyone of the pages and you will be magically directed there.</p>
<?php
include 'sitemap.php';
?>
<hr />
<p align="middle">Your IP address is <?php echo $_SERVER['REMOTE_ADDR']; ?>. You are visiting <b>danishhumair.base.pk</b>.</p>
<img src="advertisement.png" />
</body>
</html>
I can show you a picture of my files too.
if you are using Adblock try to disable it and reload the page, with that name, any advertisement block extension will stop the image from loading.
Browser problem see extensions
Related
I have searched the internet for hours trying to find someone else who shared my issue, but it seems to be entirely unique to me.
So basically, I launch my very small HTML file with live server, but only 2 divs are loaded on the webpage, and I have no idea why. I have tested it and narrowed it down to purely being an issue caused by live server, as my html file loads completely fine when the file itself is double-clicked on from file explorer, and I still have the issue when i remove my links to my css and js files from the hmtl file.
this happens on the simplest of code, and its so annoying.
here is some simple code:
and here is the screenshot of the elements not loading:
and i also show the "code injected by live server" bit, cause i think that might be the issue?
please help, this is driving me crazy.
ps. i am a newbie to live server and website making.
There can only be one body tag in whole HTML file.
You can try this instead :
<html>
<head>
<title>HTML page</title>
</head>
<body>
<div>
<p>text</p>
</div>
<div>
<p>text</p>
</div>
<div>
<p>text</p>
</div>
<div>
<p>text</p>
</div>
</body>
</html>
I am using Sublime text to write some HTML and CSS files. I've created my index.html:
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Meta -->
<meta charset="UTF-8" />
<title>RainyDayBakes</title>
<!-- Styles -->
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<h1 style="text-align:center">RainyDayBakes</h1>
<nav style="text-align:center">
<a href=”C:\Users\sarah\Documents\Simmons\CS-321\page1.html”> About </a>
<a href=”page2.html”> Menu </a>
<a href=”page3.html”> Gallery </a>
<a href=”page4.html”> Order </a>
<a href=”page5.html”> Contact Us </a>
</nav>
<img src="cake.png" alt="oreo crumble cake" class="center">
<h3>Welcome to RainyDayBakes!</h3>
<p>We are a local bakery specializing in creative cakes, cupcakes and cookies!</p>
<p>In addition to being open daily we also offer custom ordered confections.</p>
<!-- Scripts -->
<script src="scripts/index.js"></script>
</body>
<footer>
</footer>
</html>
my page1.html:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>This is Page One </title>
</head>
<body>
</body>
<footer>
</footer>
</html>
and my style.css:
<style>
h1 {
color:red;
}
</style>
When I try to run index.html in Chrome, the link to page1.html says it doesn't exist, and the CSS won't show up. They're all in the same folder, I've saved all the files, and I'm running on Chrome. Every other solution I've found refers to making a typo, the directories being different, etc. but as said, they're all in the same folder, and I haven't noticed a typo (but it's entirely possible when you're too close to your code).
First off, you're not even using the tag anywhere in your code, so that's why the style isn't showing up. Secondly, if they are in the same folder, just link your about page to page1.html; not the full directory listings.
You are using typographical quotes in your links' href attributes, which won't work. Change those to regular quotes.
Let the link be this way instead href=”page1.html”
You might want to put a link to your CSS file on all your pages, I don't see it on your page1.html You probably already know about this resource but I mention it just in case you don't: W3 Schools is very handy for a quick reference to a lot of HTML/CSS questions.
So you have two issues:
For page1.html, would suggest adding file:// or file:/// to the beginning of the href element, or maybe retyping the line since the other links worked
For your CSS, remove the tag, it's for when you put the style inside the HTML file(embedded)
This isn't an issue with your code. I was having the same exact problem too and i recently discovered that the problem likely lies in the IDE that you're using. I was using stackblitz and recived the same output. But when i switched to an online compiler and litteraly copy & pasted the code with the same file names, the code started working correctly. Try using an online compiler and see how that works out for you. It worked for me.
The compiler I used is:
https://www.onlinegdb.com/
make sure to switch the languate to HTML using the language dropdown on the top right corner.
I was watching tutorials about html for beginners and tried to make a simple html file.
when I open this on google chrome the body "hello" is showing up but the title part "first page" doesn't. Did I type something wrong? thanks in advance for your response.
//I apologies for those of you who already answered this. I now see that I have made a mistake on explaining my problem. I meant to show it as a header not title. I already got the answer from the given answers//
<html>
<head>
<title> first page </title>
</head>
<body>
hello
</body>
</html>
Where do you expect title to be shown?
Title is what usually is displayed in the tab bar of your browser, or as text in your window switcher in your operating system. It does not show up inside your webpage.
Your markup seems to be correct, just look for the title in the browser window.
If you meant to make a title (in the meaning of a large text displaying in your website) one way of doing this is to, below your body-tag, write
<h1>Title here</h1>.
<title> is not showing in web page; it is shown in Tab / Window's title.
Suggested to learn the basic HTML structure first.
i think you want a header
<html>
<head>
<title>my page </title>
</head>
<body>
<h1> first page </h1>
hello
</body>
</html>
I learned that the title is the meta tag (the SEO bits), and the H1 is what shows up on the page. So if you'd like both to be the same, example: Things I've Learned is the title and the header of your website, you'd repeat the line.
<html>
<head>
<title>Things I've Learned</title>
</head>
<body>
<h1>Things I've Learned</h1>
<p>These are the things</p>
</body>
</html>
VIA QUORA:
"The key difference between these tags is where their content appears. That difference impacts how search engines and web surfers analyze your page. Title Tag: The Title Tag is known as a meta tag. ... Because it displays the largest text, the H1 Header tag is often used to create a title at the top of the page."
More on how to optimize titles for search engines here.
I was hoping that someone may know how to resolve this HTML5 validation error. When I try to validate my page: http://blog.genesispetaluma.com using http://validator.w3.org, it gives me the following error code:
Error Line 90, Column 63: An body start tag seen but an element of the same type was already open.
<body class="home blog single-author two-column right-sidebar">
I interpreted this error to mean that I have two body tags in the code. However, I have searched everywhere and can only find one <body> (the one referenced by the error) and one </body>. Can anyone please tell me how to resolve this error?
I had a similar problem but with <head>, giving the following W3C markup error:
A head start tag seen but an element of the same type was already open
I had this code:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<head>
When it was supposed to be:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
I knew that was wrong but it's hard to spot sometimes, as you're just so used to the header code being correct 99% of the time. I obviously cut n pasted some code and that ended up in the wrong place.
This isn't specific to your question, I know, as your error relates to the <body> tag, but this is the kind of thing you're looking for. Maybe you have a <link> or <meta> tag in your body somewhere, that's meant to be in the <head>. Without seeing your code, it's hard to give you a perfect answer.
Possibly it's because:
<div id="wrapFix">
<div id="drawLogo1">
<div id="drawLogo2">
<img src="http://genesispetaluma.com/img/logoNew.png" alt="Genesis Fitness G stylelogo">
</div>
</div> <!-- end of drawLogo1 -->
Is between your closing head tag and opening body tag. I.e. lines 81-87
One of the widgets (the facebook like button I believe) you're using is inserting HTML into the page and part of that HTML is a body tag. Not sure if there's anything you can do about this, but I think that's what's throwing the error. Looks like this:
<body class="plugin transparent_widget ff4 win Locale_en_US">
</html>
</iframe>
I got this error:
A head start tag seen but an element of the same type was already open
I read this post and then i noticed my tag listed before the head like this.
<title>Home</title>
<head>
</head>
it should have been
<head>
<title>Home</title>
</head>
It happens in below said scenarios as per my knowledge -
When you mistakenly choose <head> thinking <header> tag.
When your <header>, <nav>, <section> or <footer> tag(s) are outside of <body> tag.
So, after creating your page, you can validate these changes here.
I got the same error message : check out if any body-inside <element> is displayed between the <head> and <body>, like said above.
My error was caused by a <div> tag, with absolute position, to display some page information during the development - simply a line on a false position in the code.
Hi in my case hgroup tag is the reason why I'm having validation error I, remove this tag from head tag and put it inside after body tag after this the document is now valid.
Just for the record, I had exactly the same problem and it seems that including some php files within the head element was strangely giving the problem, even if the view-source of Firefox was not printing such php code nor tags
<head>
<? include("./file.php"); ?>
<title><? echo $title ?></title>
</head>
solved using:
<? include("./file.php"); ?>
<!DOCTYPE html>
<html>
<head>
<title><? echo $title ?></title>
</head>
<body>
...
...
If Your problem With head and body both are show validate error just remove displaying text from head and keep it in body..
I have been faces the problem recently.
For Example You have text to display in header inside head just remove header from head and keep it in body ......Problem solved...Thanks
In my case it was the facebook tag
<div id="fb-root"></div>
which was inside the page's <head>.
Moved that to the <body> of the relevant page (not required globally) sorted it. So yes, the answer supplied above by Emil H was correct.
Also bear in mind, if you copy/paste your code from things like slack, etc. they will have 'special characters' for formatting (that are usually invisible) which may cause that issue.
Here is a video to demonstrate: https://drive.google.com/file/d/1OJS15zmSvzhVXVLcQGGhePZGNCxWHocN/view
This error can happen if you put into <head> tag that restricted to be there. For example:
<head>
<audio preload="auto" class="menu-beep" id="sound-01">
<source src="sound-01.mp3">
</audio>
</head>
In this case, the tag will be immediately opened in the browser memory. But later the browser will find the body tag that opens the page. This is how it turns out that there is a second body tag.
I had similar problem with <head> tag. I use https://validator.w3.org
Look at few examples how to solve this problem:
<script> should be inside <head>
css should be inside <head>
i need to integrate http://www.ebookers.com/ booking system into my web page, unfortunately i've never done that before.
Would be glad to hear any advice how to accomplish this.
Thank You !
Try this
<
html>
<head>
<title>iframe</title>
</head>
<body>
<div>
this is my part of the page
</div>
<iframe src="http://www.google.com">abcd</iframe>
</body>
</html>
u can give whatever url in src field of iframe