Important Notice:

Course Content
Heading Tag / Paragraph Tag
0/2
Horizontal Rules (HR element)
0/1
Font Element
0/1
Image Element
0/1
HTML Basic (Chapter 3) M2-R5.1
About Lesson

Anchor Tag Attributes

a. Href     b. Name      c. Title         d. Target      e. download      f. mailto

href Attribute (Hypertext Reference):-

                        इसकी सहायता से हम एक प्रकार से link स्थापित कर सकतें है link स्थापित करने केलिए उस link के रूप में हमे उसमें web page address दे  सकते है या फिर PDF file दे सकते है या file address दे सकते है

Syntax: – <a href=“URL”>

  • An absolute URL – points to another web site
    Ex: – href=”https://nielitexam.co.in/
  • A relative URL – points to a file within a web site
    Ex:- href=“page1.html”

Name attribute:-

हमें वेब पेज को किसी भाग पर open कर सकतें इसका निर्धारण इसकी सहायता से कर सकते है। अगर हमारा page लंम्बा है तो हम उस page के नीचे को प्वांइट कर सकते है या फिर उपर को प्वांइट कर सकते है और साथ साथ नाम देकर भी उसको प्वांइट कर सकते है।

  • सबसे पहले हमें target document को edit करना होगा और उस page के उस section को नाम देना होगा जिसे हम एंकर element की NAME attribute का उपयोग करके refer करना चाहते हैं।हम इसे निम्न प्रकार से करते हैं-

Syntax:-<a name=”section name”>…………..new section……….</a>

  • दूसरा, हमें उस नाम को अपने हाइपरलिंक में specify करना होगा, ताकि उस पर क्लिक करने पर हम page के नामित section में पहुंच जाएं। हम इसे निम्न प्रकार से करते हैं-

Syntax:-<a href=”#linkname”> link to named section of the same page </a>

Title attribute:-

इस Attribute से Link को परिभाषित किया जाता है जब आप किसी Link पर माउस को ले जाते है तो यह Title दिखाई देता है

Syntax:-<a href=”link” title=”description”>

Example:-<a href=”input.html” title=”List of input devices”>input devices </a>

Target attribute:-

इस attribute की Help से Browser को ये बताया जाता है की Destination Address को किस जगह Open करना है। target attribute में अलग अलग Value दी जा सकती है।

_blank

_parent

_top

Targetframe

_self

यह value url को new tab /window पर open करती है।

यह value url को parent frame मे open करने का काम करती है।

यह value url को पूरी window मे open करती है।

link किये गये दस्तावेज़ को named frame मे open करता है।

यह value url को same tab /window मे open करती है, जिस window / tab पर आपने url को click किया है। (this is default)

 

Download Attribute

आप HTML से Download Link भी बना सकते है Download Links का उपयोग विभिन्न प्रकार की फाईलों को Downloadable बनाने के लिए किया जाता है आप Word, PDF, Videos, Pictures, Audios आदि प्रकार की फाईलों को अपने Users को Download करा सकते है Files को Downloadable बनाने के लिए File का Full Path लिखना पड़ता है

Ex: -<ahref=”/images/example.jpg” download=“ak_It_Solution_Web_Design_Notes”>

Mail To Attribute:-

HTML से आप ईमेल लिंक भी बना सकते है E-mail Link के द्वारा आप Users को सीधे E-mail Programs तक ले जा सकते है

Ex:-<a href=”mailto:info@olevelnotes.com”>Mail Us</a>

 

Anchor Tag Attributes

a. Href      b. Name      c. Title         d. Target      e. download     f. mailto

href Attribute (Hypertext Reference):-

     this attribute is used to create a hyperlink to another web page of the same web site. In other words, we can say that it is used to create external or local link.

Syntax: – <a href=“URL”>

  • An absolute URL – points to another web site
    Ex: – href=”https://student.nielit.gov.in/”
  • A relative URL – points to a file within a web site
    Ex:- href=“page1.html”

Name attribute:-

The ‘name’ attribute allows links to be able to point to a specific section within the same web page. It is a two step process.

  • First we must edit target document and give name to that section of the page which we want to refer to, using NAME attribute of anchor element. We do it in the following way-

Syntax:- <a name=”section name”>…………..new section……….</a>

  • Second, we must specify that name to our hyperlink, so that clicking on it will take us to the named section of the page. We do it in the following way-

Syntax:- <a href=”#linkname”> link to named section of the same page </a>

Title attribute:-

This is used in the anchor element to display a note or a tool tip when cursor is placed over a hyperlink. This attribute is used along with hypertext reference attribute to provide the description on the link.

Syntax:- <a href=link title=description>

Example:- <a href=”input.html” title=”List of input devices”>input devices </a>

Target attribute:-

This attribute is used in the anchor element to specify where we want our linked page to appear. It is used along with hypertext reference attribute in anchor element.

_blank

_parent

_top

targetframe

_self

Opens the linked document in a new window or tab

Opens the linked document in the parent frame

Opens the linked document in the full body of the window

Opens the linked document in a named frame

Opens the linked document in the same frame as it was clicked (this is default)

 

Download Attribute

The download attribute specifies that the target will be downloaded when a user clicks on the hyperlink.

Ex: –<a href=”/images/example.jpg” download=“olevelpdf”>

Mail To Attribute:-

You can also create email links with HTML. Through email links, you can take users directly to email programs.

Ex:-<a href=”mailto:info@olevelnotes.com”>Mail Us</a>

error: Content is protected !!