Relative urls are not working

In this link under absolute URL and relative URL
Absolute URL and Relative URL absolute URL I understand & relative URL also I understood but, It’s not working in my practice. In code page
I clicked with the control button in the keyboard browser also opened but the page not opened.
This is the code

<!DOCTYPE html>

<h2>Absolute URLs</h2>
<p><a href="">W3C</a></p>
<p><a href="">Google</a></p>

<h2>Relative URLs</h2>
<p><a href="html_images.asp">HTML Images</a></p>
<p><a href="/css/default.asp">CSS Tutorial</a></p>


Please fix it

we would really like to help you, but you need to provide the code that is giving issues

I edited my post after you ask. Please visit the link where existed the code was. The above code is in the link under Absolute URLs vs. Relative URLs heading.

now, important - do these exist?
if you use them in their playground, the files exist and so it works. But if you use it somewhere else, you need to have those files

Than when I have to do. how do I practice?

relative links work for other files in your website, if you have not other files then you have no need for them

you can create a multi page website in something like replit, which allows for multiple files

Thank you, madam, for giving the best answer. :grin:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.