Future

Supporting Other Elements

Several HTML elements have attributes that reflect a URL. These attributes are commonly used for linking resources, navigation, media, and metadata. Here’s a list:

πŸ”— Anchor & Navigation Elements

  • <a href="https://example.com"> β†’ href: Specifies the hyperlink destination.

  • <area href="https://example.com"> β†’ href: Defines a hyperlink in an image map.

  • <link href="https://example.com/style.css"> β†’ href: Links external stylesheets, icons, etc.

  • <base href="https://example.com/"> β†’ href: Sets the base URL for relative links on the page.

πŸ–ΌοΈ Media Elements

  • <img src="https://example.com/image.jpg"> β†’ src: Defines the image source.

  • <audio src="https://example.com/audio.mp3"> β†’ src: Specifies the audio file location.

  • <video src="https://example.com/video.mp4"> β†’ src: Specifies the video file location.

  • <source src="https://example.com/media.mp4"> β†’ src: Used within <audio> and <video> elements.

  • <track src="https://example.com/subtitles.vtt"> β†’ src: Specifies caption files for media.

🎬 Embedded & Interactive Content

  • <iframe src="https://example.com"> β†’ src: Embeds another web page.

  • <embed src="https://example.com/animation.swf"> β†’ src: Embeds external content (e.g., Flash, PDFs).

  • <object data="https://example.com/file.pdf"> β†’ data: Specifies the URL of an external resource.

πŸ“ Forms & Inputs

  • <form action="https://example.com/submit"> β†’ action: Specifies where to send form data.

  • <input type="image" src="https://example.com/button.png"> β†’ src: Defines the image button source.

πŸ“œ Scripts & Styles

  • <script src="https://example.com/script.js"> β†’ src: Specifies the JavaScript file location.

  • <style>@import url("https://example.com/style.css");</style> β†’ CSS url() function (indirect reference).

🧩 Web Components & App-Specific

  • <applet codebase="https://example.com/java/"> β†’ codebase: Specifies the base URL for a Java applet (deprecated).

  • <meta content="https://example.com" property="og:url"> β†’ content (in Open Graph meta tags).

  • <meta http-equiv="refresh" content="5; url=https://example.com"> β†’ Redirects to a URL.

Last updated

Was this helpful?