I know the question has been asked a million times, but I just can't find any explanation to the following issue: I've inserted an image in my code, and when I open the page in my browser, I'm just having a broken link.
Here is my code:
<!doctype html>
<html>
<head>
<title>Laura Caroline’s Portfolio</title>
<link href=“/teststyle.css” type=“text/css” rel=“stylesheet”/>
</head>
<body>
<h1>About me</h1>
<p><img src=“portrait.jpeg”/></p>
</body>
</html>
The photo is in the same folder than the page. I've double checked the name.
I'm on MacOS Sierra (if of any help). Oh, and I'm a beginner :) Any clue about where to look to fix this?
Thanks!
As I can see make sure it's in the same directory. Try adding './file.jpg'
About the quotation marks they don't really look like the standard ones. So try replacing that with ""
Related
<!DOCTYPE html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<img src="DFDD.png">
</body>
</html>
the image is not showing while using links is there something wrong with it, the image is in the same folder...i am using brave browser...the webpage is when run completely blank....really can't figure out whats wrong with it
//this problem occurs only while using the live server extension of vs-code..
try to use ./YOUR_IMAGE_NAME instead of just YOUR_IMAGE_NAME. I hope it will work.
Does not perform this operation. When you run the code, the program outputs a blank page, and should display Hello, World !. Please correct the error!
<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body> Hello, World! </body>
</html>
The quotes around top in cannot be the "Microsoft specific" quotes.
This: "_top" works
This: “_top” fails
Just copy and past your html file as it is. There is nothing wrong with your html tags, everything is working fine and up to mark.
After seeing your question I am impatient to know about that how you create your html file?
No matter what I try, images won't display in my browser. I've made sure file names were matching, that the directories were correct, etc. I've tried different images just to see if anything will load.
Here is an example of my code. The image and index file are in the same folder. Can anyone help?
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<img src=“rollingrick.jpg” alt=“Rick”>
</body>
</html>
I am really basic at HTML/CSS but with the help from this website I managed to get the following working. The colour looks right, so its all working.
But when I put this in the HTML Source Editor in Moodle the colour disappears, so I know that its a HTML editor and the colour is contained in style as CSS. So i guess I need to link to a style sheet to give me that colour, but I have no idea how to do that. Or maybe I am wrong about that, and something else could be done.
I already checked W3 Schools, and its most likely I just don't have the jargon yet to properly look for the answer to this problem, so a google search when you simply don't have the vocab for what exactly I am looking for is difficult.
Please if you can help that's great, but I also want to better know what it is I should be looking at, as I am only doing this for Moodle, any places you can point me to where I can find or see how HTML/CSS works with Moodle so I can learn about it so I can slowly build up my own knowledge. I greatly appreciate this.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style>
.label.label-default {
background-color:#009999;
</style>
</head>
<body>
<h1><span class="label label-default">Survey</span></h1>
</body>
</html>
I will answer to you , first you put style css in same file of html ,so remove the whole link of style . then in style write like this
I advise to you use Adobe Dreamweaver program , I hope my answer solve your problem.
When I have a simple HTML markup like this:
<!DOCTYPE html>
<html>
<head>
<title>lawl</title>
</head>
<body>
</body>
</html>
When viewing the elements of the document, in the Chrome Deceloper Tool(F12) it looks likes this:
<!DOCTYPE html>
<html>
<head>
<title>lawl</title>
<style type="text/css"></style> <-- what the?
</head>
<body>
</body>
</html>
So, my question goes: Where does the style tag come from? What added it, and why?
Hope you guys can clear this up for us, it's been quite the subject the last 10 minutes in class ;-). Also worth mentioning; a class got added to a empty div in another document when the teacher tried it.
Edited title.
Chrome plugins can get access to your DOM, and so does the development tools. In this particular case, I think the development tools is the one to blame.
The empty style tag is probably a placeholder for injected CSS.
If you open the source code (view-source:www.example.com), you will see that your DOM is perfectly fine.
99:1 that the <style> element is a stylesheet injected by your AdBlock (or similar) extension.