How to specify the base URL target for all relative URLs in a document?

नमस्कार दोस्तों! इस लेख में हम How to specify the base URL target for all relative URLs in a document? के बारे में बात करेंगे।

How to specify the base URL target for all relative URLs in a document?

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Base URL Example</title>
    
    <!-- Define the base URL for all relative links -->
    <base href="https://www.example.com/" target="_blank">
</head>
<body>

    <!-- Relative URL (resolved to https://www.example.com/page1.html) -->
    <a href="page1.html">Go to Page 1</a>

    <!-- Relative image source (resolved to https://www.example.com/images/pic.jpg) -->
    <img src="images/pic.jpg" alt="Example Image">

</body>
</html>

DesignWithRehana

हम आशा करते है की आपको आपके सवाल How to specify the base URL target for all relative URLs in a document? का जवाब मिल गया होगा।

इसे भी पढ़े:

Leave a comment