Questions tagged [src]

SRC is a common attribute in HTML used to identify the location of a resource which relates to an element.

Within HTML, several elements may make use of the src attribute in order to identify a resource to which the element may relate. It is normally a "valid non-empty URL potentially surrounded by spaces".

Questions often arise relating to the attribute due to confusion between absolute and relative URLs, how src URLs relate to the location of files, and browser caching.

Some examples of elements which use the src attribute are:

  • IMG

    Specifies a URL referencing a non-interactive, optionally animated, image that is neither paged nor scripted.

  • IFRAME

    Gives the address of a page that the nested browsing context is to contain.

  • SCRIPT

    Gives the address of the external script resource to use.

  • EMBED

    Gives the address of the resource being embedded.

  • VIDEO

    The URL for the video.

  • AUDIO

    The URL for the audio stream.

  • TRACK

    Gives the address of the timed track data. This attribute must be present.

There are other elements which may make use of the src attribute, which may be discovered at the W3C Community Wiki.

Related tags: , , , ,

1612 questions
-1
votes
3 answers

Image Src for calling a Servlet

I want to call a Servlet from img src. I have defined a Servlet class with name ImageProducerServlet and registered it in web.xml: ImageProducerServlet
Tapas Bose
  • 25,780
  • 71
  • 202
  • 317
-1
votes
0 answers

Dynamically create and now a connection established , router.get('/user',(req,res)=>{ console.log('req recived ') }) and now a request has been received to the router ,then…

-1
votes
2 answers

How to get the img (src) link from the Zomato order page?

from selenium import webdriver from selenium.webdriver.common.by import By import time PATH = "/Users/macop/Tools/ChromeDriver/chromedriver" driver =…
Memba
  • 1
  • 1
-1
votes
1 answer

Hide some parts of Html source codes (src part of 3d models)

My page based on html javascripts and css for view product's models in 3D form on web. Im trying to hide my
-1
votes
2 answers

Can Unicode be used in 'src' attribute of tag instead of a path

I was wondering if we could use Unicode images in the src attribute of img tag instead of a path. Will the browser be able to identify the code?
-1
votes
1 answer

MIME type issue in JavaScript

I am working in a Web site. My is like below.
abu abu
  • 4,662
  • 6
  • 48
  • 93
-1
votes
1 answer

How to change src to data-src in certain div

Page with issue: https://373834.myshoptet.com/80-104-cm/ JS code on page:
 
Load tab content from: https://373834.myshoptet.com - Tab…
-1
votes
3 answers

How do I check if a webpage is on HTTP and if so, switch to HTTPS in JavaScript?

I am trying to test if a webpage is HTTP and then if so, I want it to go to the HTTPS version of the site. However, it is not working. For some reason, no error message is thrown, but it doesn't execute. The javascript is on domain1.com and the…
-1
votes
1 answer

what is the difference between rel and href and src in HTML

all of : href src rel attributes all seems to have same function so why each html element use these different attributes . So what is the function of each of these attributes and when to use each one of them
khaled
  • 51
  • 5
-1
votes
1 answer

Add images to html canvas

Im trying to set up a background image in my html canvas by creating a function that clears the canvas and draws the background image to fill the canvas. I've been trying to figure out where I went wrong and why no images are appearing on preview.…
idkbro
  • 1
-1
votes
1 answer

Replace the src attribute of an image from a text field in a form

I am trying to find a way of loading an image from a directory after the user enters text inside a text field with a submit button. (simply put a search button that displays the result) However the client does not have a database and it not willing…
-1
votes
1 answer

Default path in HTML for JS file if not found from original source

I am wondering, is it possible to provide an alternative path for a file if it cannot be found from the original one? For example I provide an src which points to an external source, this should be the default src, but if it cannot be reached for…
victorio
  • 5,234
  • 16
  • 65
  • 96
-1
votes
1 answer

Can't resolve './src'

I'm learning react-redux app and now I'm trying to pass to th browser a "Hello World!" but when I start it with npm it appears an error and I don't really know how to fix it. Sorry I'm a bit noob in this coding…
Za Fra
  • 13
  • 7
-1
votes
1 answer

Why is my HTML file unable to use the JavaScript file that I have linked?

JavaScript file is not used in the HTML file despite linking it I am unable to use the JavaScript file and validate my HTML form. I am wondering if the issue is the linking of the src directory is wrong or could it be that I am missing something in…
Jack Goh
  • 1
  • 3
1 2 3
99
100