A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/html/html-link-crossorigin-attribute/ below:

HTML <link> crossorigin Attribute - GeeksforGeeks

HTML <link> crossorigin Attribute

Last Updated : 06 Jun, 2022

The HTML crossorigin Attribute in <link> element is used to specifying that supports the HTTP CORS request when fetching or loading the stylesheet or icon files from the third-party server.

Syntax:

<link crossorigin="anonymous | use-credentials">

Attribute Values:

Example: Below code demonstrates the use of crossorigin Attribute with the <link> element. 

HTML
<!DOCTYPE html>
<html>

<head>
    <link id="linkid" rel="stylesheet" 
        type="text/css" href="styles.css" 
        sizes="16*16" hreflang="en-us"
        crossorigin="anonymous">
</head>

<body style="text-align:center;">
    <h1>GeeksForGeeks</h1>
    <h2>HTML <link>
        crossorigin Attribute
    </h2>
</body>

</html>

Output:

Supported Browsers:



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4