Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • HTML Tutorial
  • HTML Exercises
  • HTML Tags
  • HTML Attributes
  • Global Attributes
  • Event Attributes
  • HTML Interview Questions
  • HTML DOM
  • DOM Audio/Video
  • HTML 5
  • HTML Examples
  • Color Picker
  • A to Z Guide
  • HTML Formatter
Open In App
Next Article:
HTML | <li> type Attribute
Next article icon

HTML <a> type Attribute

Last Updated : 06 May, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

The HTML <a> type attribute specifies the MIME type of the linked document. It is not widely used, the type attribute can help browsers to understand the type of content that is being linked. It can be beneficial for certain applications and optimizations.

Syntax

<a type="media_type">

Attribute Values

  • media_type: It specify the Internet media type of the embedded file. 

Usage

  • Used to create hyperlinks that navigate to external websites, internal pages, or sections within the same page.
  • Requires the href attribute to define the link’s destination (e.g., a URL, file path, or anchor ID).
  • Can open links in the same tab or a new tab using the target attribute (e.g., _self, _blank).

Example: This example demonstrates the use of HTML <a> type attribute.

html
<!DOCTYPE html> <html>  <head>     <title>HTML a type Attribute</title> </head>  <body>     <h2>GeeksforGeeks</h2>      <h3>HTML a type Attribute</h3>      <p>Welcome to         <a href="https://www.geeksforgeeks.org/community/"              type="text/html">             GeeksforGeeks         </a>     </p> </body>  </html> 

Output

Output

HTML Attribute

Supported Browsers

  • Chrome 1
  • Edge 12
  • Firefox 1
  • Opera 15
  • Safari 1


Next Article
HTML | <li> type Attribute
author
jit_t
Improve
Article Tags :
  • HTML
  • Web Technologies
  • HTML-Attributes

Similar Reads

  • HTML | <area> type Attribute
    The <area> type attribute is used to specify the Internet media type of the linked document. It is used only when href attribute is set.Syntax: <area type="media_type"> Note: This attribute is not supported in HTML5. Attribute Values: It contains single value media_type which is used to
    1 min read
  • HTML | <a> rel Attribute
    The rel attribute is used to specify the relationship between the current and the linked document. It is used only when the href attribute is present. Syntax: <a rel="value">Attribute Values: alternate: It defines an alternate version of the document i.e. print page, translated, or mirror.auth
    1 min read
  • HTML | <li> type Attribute
    The <li> type attribute in HTML is used to specify the type of a list items. This attribute also defines the style of the bullet point of the list items. Syntax: <li type="1|a|A|i|I|disc|circle|square"> Attribute Values: For ordered list items: 1: It is the default value. It is used to s
    2 min read
  • HTML <ol> type Attribute
    The HTML <ol> type attribute specifies the kind of marker to use in the list (letters or numbers). This attribute allows customization of ordered list markers, offering options like decimal numbers, uppercase or lowercase letters, and uppercase or lowercase Roman numerals, tailoring the list a
    2 min read
  • HTML <ul> type Attribute
    The HTML <ul> type attribute in the <ul> tag specifies the type of marker used in an unordered list. Values include disc (default filled circle), circle (hollow circle), square, and none. It controls the appearance of list items. Note: The ul type attributes are not supported by HTML 5.
    2 min read
  • HTML <a> rev Attribute
    The HTML <a> rev attribute is used to define the relationship between the linked document and the current document. This attribute is reversed of HTML rel attribute. It is not supported in HTML5. Syntax: <a rev="value">Attribute values: alternate: It defines an alternative version of the
    2 min read
  • HTML | <a> shape Attribute
    The shape attribute is used with the coords attribute to describe the size, shape, and placement of a link in an <object> or <img> element. It is not supported by HTML 5.Syntax: <a shape="value"> Attribute Values: default: It is used to specify the entire region.rect: It is used to
    1 min read
  • HTML <a> name Attribute
    The HTML anchor name attribute is used to specify the name for an <a> element. It is used to reference the form data after submitting the form or to reference the element in JavaScript. Note: The <a> name attribute is not supported by HTML5. Syntax<a name="name"> Attribute Values:A
    1 min read
  • HTML <a> target Attribute
    The HTML <a> target Attribute is used to specify where to open the linked document. This attribute enhances the functionality and user experience by allowing developers to control the behavior of links. Syntax<a target="_blank | _self | _parent | _top | framename"\> Attribute Values_blan
    1 min read
  • HTML <menu> type Attribute
    The type attribute in <menu> element is used to define the type of menu bar. It is also used with the <menuitem> tag which defines the type of commands of the menu items.  Syntax: <menu type="list|context|toolbar">Note: This attribute has been deprecated and is no longer used. Attr
    1 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences