Skip to main content

Anchor & Image Tags along with their attributes

Anchor TAG

Anchor and Image Tag :

Anchor or A Tag :

HTML anchor tag defines a hyperlink that links one page to another page. It can create hyperlink to other web page as well as files, location, or any URL.For example : in our Regular innovations Website we can find so many links to the other pages which will be useful for going from one web page to another webpage.

Sarting Tag : <a> Ending tag : </a>

Attributes :

    It has different attributes like
  1. href
    • mailto:
    • tel:
  2. Target
  3. download
  4. Image or img Tag :

    HTML Image tag is used to embed an image in an HTML page. Images are not technically inserted into a web page; images are linked to web pages.For example : In our Regular innovations Website we are using this tag for creating attractive look for the website.

    Sarting Tag : <img> Ending tag : </img>

    Attributes :

      It has different attributes like
    1. src
    2. alt
    3. title
    4. height
    5. width
    6. For this first take a notepad and copy code then save it with .html extension.Thats it your Program will be exected.if You want to check its effect within this website plese click on EXECUTE button.

      1. href attribute : This is used to give the link of particualr web page . The values for this Attribute will be actual link of web page, mailto:to send mail to the provided mail address , tel: it is used to make call to particular mobile Number

      CODE <html> <head> <title> A TAG </title> <style type="text/css"> </style> </head> <body > <a href="https://www.youtube.com/channel/UCurLHTvkk9-mZ2YjqsLHtKg"> Go to MSR WebTech Youtube channel </a><br/> <a href="mailto:msrwebtech@gmail.com"> Send a mail to Msr WebTech </a><br/> <a href="tel:9848******"> Make a call to Msr WebTech </a><br/> </body> </html>
      OutPut (Click on above execute Button)

      2. Target attribute : This is used to specify where your web page has to be opened . The values for this Attribute will be Blank,new,top,self,in frames we can fix the target by using frame name

      CODE <html> <head> <title> A TAG </title> <style type="text/css"> </style> </head> <body > <a href="https://www.youtube.com/channel/UCurLHTvkk9-mZ2YjqsLHtKg"> Go to MSR WebTech Youtube channel on same page </a><br/> <a href="https://www.youtube.com/channel/UCurLHTvkk9-mZ2YjqsLHtKg" target="blank"> Go to MSR WebTech Youtube channel in new tab </a><br/> <a href="https://www.youtube.com/channel/UCurLHTvkk9-mZ2YjqsLHtKg" target="self"> Go to MSR WebTech Youtube channel (Self - Effect will be appear on only Frames) </a><br/> <a href="https://www.youtube.com/channel/UCurLHTvkk9-mZ2YjqsLHtKg" target="top"> Go to MSR WebTech Youtube channel ( top- Effect will be appear on only Frames) </a><br/> </body> </html>
      OutPut (Click on above execute Button)

      3.Download attribute : This is used to Download file when you click the link

      CODE <html> <head> <title> A TAG </title> <style type="text/css"> </style> </head> <body > <a download="" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgShqznfbydYS5_ftfsZPA0TUM7WzAMle82eQ09y8TnZXsqy2_DCncZuhVe0yeoK9n2YLpIA9mrFL7a3wL9JBxJKyQZ59MyNvpZ-Ik57TtKvVqdryzxuJGt1JJiLVuwkq4PBcOfY-K_0A/s0/anchor_tag.jpg"> Download MSR WebTech Youtube channel Image </a><br/> </body> </html>
      OutPut (Click on above execute Button)

      Img or Image Tag :

      1.Src : This is used to Display image on web page

      CODE <html> <head> <title> Img TAG </title> <style type="text/css"> </style> </head> <body > <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgShqznfbydYS5_ftfsZPA0TUM7WzAMle82eQ09y8TnZXsqy2_DCncZuhVe0yeoK9n2YLpIA9mrFL7a3wL9JBxJKyQZ59MyNvpZ-Ik57TtKvVqdryzxuJGt1JJiLVuwkq4PBcOfY-K_0A/s0/anchor_tag.jpg"> </img><br/> </body> </html>
      OutPut (Click on above execute Button)

      2.Alt : This is used to Display Name of the image when website is failed to load image.

      CODE <html> <head> <title> Img TAG </title> <style type="text/css"> </style> </head> <body > <img alt="Sorry Failed to load Msr WebTech Youtube channel Image" src="1.jpg"> </img><br/> </body> </html>
      OutPut (Click on above execute Button)

      3.Title : This is used to Display Name of the image when take the mouse Over to the image

      CODE <html> <head> <title> Img TAG </title> <style type="text/css"> </style> </head> <body > <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgShqznfbydYS5_ftfsZPA0TUM7WzAMle82eQ09y8TnZXsqy2_DCncZuhVe0yeoK9n2YLpIA9mrFL7a3wL9JBxJKyQZ59MyNvpZ-Ik57TtKvVqdryzxuJGt1JJiLVuwkq4PBcOfY-K_0A/s0/anchor_tag.jpg" title="Msr WebTech Youtube channel Image"> </img><br/> </body> </html>
      OutPut (Click on above execute Button)

      4.Height & Width Attributes : These are used to set the Hight and width of the image interms of Pixels like 10,20....etc

      CODE <html> <head> <title> Img TAG </title> <style type="text/css"> </style> </head> <body > <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgShqznfbydYS5_ftfsZPA0TUM7WzAMle82eQ09y8TnZXsqy2_DCncZuhVe0yeoK9n2YLpIA9mrFL7a3wL9JBxJKyQZ59MyNvpZ-Ik57TtKvVqdryzxuJGt1JJiLVuwkq4PBcOfY-K_0A/s0/anchor_tag.jpg"> This is Normal Msr WebTech Image </img><br/> <img height="50px" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgShqznfbydYS5_ftfsZPA0TUM7WzAMle82eQ09y8TnZXsqy2_DCncZuhVe0yeoK9n2YLpIA9mrFL7a3wL9JBxJKyQZ59MyNvpZ-Ik57TtKvVqdryzxuJGt1JJiLVuwkq4PBcOfY-K_0A/s0/anchor_tag.jpg" width="100px"> This is Msr WebTech Image after setting height 50 and width 100 pixels </img><br/> </body> </html>
      OutPut (Click on above execute Button)

      Combination of Anchor tag ,Image and Marquee tag :

      CODE <html> <head> <title> Combination of Anchor tag ,Image and Marquee tag </title> <style type="text/css"> </style> </head> <body > <marquee id="test" bgcolor="orange" onmouseover="document.all.test.stop()" onmouseout="document.all.test.start()" > <a download="" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgShqznfbydYS5_ftfsZPA0TUM7WzAMle82eQ09y8TnZXsqy2_DCncZuhVe0yeoK9n2YLpIA9mrFL7a3wL9JBxJKyQZ59MyNvpZ-Ik57TtKvVqdryzxuJGt1JJiLVuwkq4PBcOfY-K_0A/s0/anchor_tag.jpg"> <img height="100px" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgShqznfbydYS5_ftfsZPA0TUM7WzAMle82eQ09y8TnZXsqy2_DCncZuhVe0yeoK9n2YLpIA9mrFL7a3wL9JBxJKyQZ59MyNvpZ-Ik57TtKvVqdryzxuJGt1JJiLVuwkq4PBcOfY-K_0A/s0/anchor_tag.jpg" title="Msr WebTech Image" width="150px"> </img> <a> </marquee> <br/> </body> </html>
      OutPut (Click on above execute Button)

Comments

Popular posts from this blog

Image map or Map and Area tags

Anchor TAG Image Map or map Tag : An image map is an image with clickable areas. Sarting Tag : Ending tag : Attributes : It has different attributes like usemap name Area Tag : It contains Area tag Sarting Tag : Ending tag : Attributes : It has different attributes like shape coords href For this first take a notepad and copy code then save it with .html extension.Thats it your Program will be exected.if You want to check its effect within this website plese click on EXECUTE button. 1. Usemap attribute : Usemap att...

Marquee Tag and Its Attributes

Marquee TAG Marquee Tag : Marquee is one of the important tags in Website creation .it is generally used to scrooling the content on the webpage .For example : in our regular innovations Website i use this for showing latest updates on my website. Sarting Tag : Ending tag : Attributes : It has different attributes like Direction Height Width Behavior Scrolldelay Scrollamount Hspace Vspace Loop Bgcolor Id & Hovering effects ...

Fieldset and Pre Tags in HTML with Live execution

Fieldset Tag in HTML Fieldset & Pre Tags in HTML : 1. Fieldset Tag : is used for grouping related form elements in a box.It is used to give user a clear view about Content. Starting tag : Ending tag : 2. Legend Tag : Legend tag is used to give title for Fieldset. Starting tag : Ending tag : 3. Pre Tag : Pre tag is used to set alignment of your web page as coded line wise . Starting tag : Ending tag : For this first take a notepad and copy code then save it with .html extension.Thats it your Program will be exected.if You want to check its effect within this website plese click on EXECUTE button. CODE Fieldset ,Pre TAGs Login Page User Name : Password : OutPut (...