**Possible values:**
β’ **Absolute URL:** Points to an external website (e.g., `href="https://www.example.com/css/theme.css"`).
β’ **Relative URL:** Points to a file within the same website (e.g., `href="/themes/theme.css"` or `href="theme.css"`). | --- ## Code Examples ### Example 1: Linking to an External Stylesheet This is the most common use case for the `` tag and its `href` attribute. ```html
Hello World
This page is styled using an external stylesheet.
``` ### Example 2: Adding a Website Favicon You can use the `href` attribute to point to an icon file that will display in the browser tab. ```html ``` ### Example 3: Resource Hinting (DNS Prefetch) You can use `href` to tell the browser to resolve DNS domain names before a user clicks a link, improving page load performance. ```html ``` --- ## HTML 4.01 vs. HTML5 There are no functional differences in how the `href` attribute behaves between HTML 4.01 and HTML5. However, in HTML5, the `type` attribute (e.g., `type="text/css"`) is no longer strictly required when linking CSS stylesheets, making the syntax cleaner: ```html ```
YouTip