Use app×
QUIZARD
QUIZARD
JEE MAIN 2026 Crash Course
NEET 2026 Crash Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
87 views
in Information Technology by (50.2k points)
closed by

What is Relative URL ?

1 Answer

+1 vote
by (46.8k points)
selected by
 
Best answer

Relative URL

A Relative URL is targeted to a file or directory in relation to the present file or directory. If the web site has several sections and the files and web pages for each section have been segregated into different directories. This helps in keeping things organized and uncluttered on the web site. The relative URLs are shorter than absolute URLs and hence the file size of the web page would reduce, if you use the former.

For example :

If we want to include the image file hardware.gif stored in the images directory of www.developers.com domain on this page using an absolute URL.

The tag for this image display will be as follows:

Using a Relative URL in an <IMG/> tag

<img src= http://www.developers.com/images/hardware.gif width=".." height=".." />

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...