How to add image in HTML from a link? - html

I would like to add the image present at this link http://startup.registroimprese.it/isin/search?0-IResourceListener-data-resultRow-22-resultViewPnl-companyCardContainer-logoImg&antiCache=1628599295826 to my html page. Therefore, I have added the above URL to the "src" attribute in the < img> tag. My HTML code looks like this:
<html lang="en">
<head>
<meta charset="utf-8">
</head>
<body>
<img src="http://startup.registroimprese.it/isin/search?0-IResourceListener-data-resultRow-26-resultViewPnl-companyCardContainer-logoImg&antiCache=1628599295828">
</body>
</html>
However, the image is not displayed when I render the page, and this is what I see.
blank page
What I expect to see instead, is the image at the link correctly displayed on my html page. Any idea what is wrong and how I could fix it?
NOTE: I know I could download the image locally and then add it, but I specifically need to find a solution to add the image from the link, and not from a path on my local computer.

Related

Why Won't My Images Display? Feel like I've tried everything

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>

can't add image to HTML

i am struggling to add any images whatsoever to html, for them to show when i open in browser
i have tried different images, using them in the correct directories, relative and absolute url
i really do not know why im getting nothing to show...
<!DOCTYPE html>
<html>
<head>
<title> how to</title>
</head>
<body>
<div>
<img src="‪https://static1.squarespace.com/static/503264b0e4b0dbdecd41e3f6/t/590a05131e5b6ce08768b593/1493828890055/polaroid2.png"/>
</div>
</body>
</html>
even the image address copied won't show
any ideas???
As shown in the figure below, there is a special character in your url, causing the browser to treat it as a file on your server instead of on squarespace. Remove that, and your image should be displayed as normal.
<body>
<div>
<img src="https://static1.squarespace.com/static/503264b0e4b0dbdecd41e3f6/t/590a05131e5b6ce08768b593/1493828890055/polaroid2.png"/>
</div>
</body>
This seems to work, deleted first double quotes and then added it back
Or delete the first quotes and then the first h to be sure, then retype

How to include question marks in html img src attribute when using phantomJS rasterize command

I am trying to use phantomjs to turn html into pdf, and I have some html code with image src attributes that have "?" in them so that they can pass in info from the get array.
Example
<!DOCTYPE HTML>
<html>
<head>
</head>
<body>
<img src="www.somewhere.com/pictures?id=1229384&key=somekey"/>
<div>link</div>
</body>
</html>
When I try to turn the html into a pdf using phantomJS rasterize.js it cuts the href and the src at the "?" and the stuff in the get information is not passed in, and thus the image does not appear.
Does anyone know how I can get passed this?

html doesn't show in browser

I need to figure out what makes the html code in this page doesn't show in browser.
http://arbsq.net/dev/out_html.htm
I checked with:
http://validator.w3.org/check?uri=http%3A%2F%2Farbsq.net%2Fdev%2Fout_html.htm&charset=%28detect+automatically%29&doctype=Inline&group=0
But it is not clear to me what causes the browser not to process the html code
Remove the <title/> tag. The browser is interpreting your entire html code as the title of the page.
Remove <title/> or change to <title>Site title</title> otherwise the hole site is interpreted as your title.
You need to move the contents of your <title></title> tag to the <body></body> tag. If you just remove the <title></title> tag like others have suggested, it will still not show because tags in the <head></head> tag are invisible to the end user. The <head></head> tag contains scripts and links to external resources as well as information about the page for the browser. The <body></body> tag should contain all of your HTML markup for the page.

Defining root of HTML in a folder within the site root folder

I want to have a new folder containing a set of new html files. All the images inside it are in the format src="image.png" and image.png is located in the root folder. But when you put the HTML file in a new folder it can't find the image. You have to have it in the format src="../root folder/folder/image.png" to make it work. Which would mean a lot of pasting. I have tried putting image.png inside the folder but no change.
Use the <base> element. It allows you to specify a URL for all relative URLs in a page.
For example
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>This is an example for the <base> element</title>
<base href="http://www.example.com/news/index.html">
</head>
<body>
<p>Visit the archives.</p>
</body>
</html>
The link in the this example would be a link to "http://www.example.com/news/archives.html".
For you, the base URL may be something as simple as <base href="http://www.yoursite.com/">. This would make images specificed as src="image.png" resolve as "http://www.yoursite.com/image.png"
See also https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
You need to set the base tag. If you add the tag in your page <head> like this:
<base href="http://yoursite.tld/folder/">
it should display images and with sources relative to this base path.