Adding Links in HTML

Adding Links-



  • To add links in a HTML file we use <a href=" "> tag. The link URL is to be written in the " ".
  • Here href is an attribute to a which takes URL as an argument.
  • The <a> tag has its closing tag as </a>
  • We use a text before closing the <a href> tag. This tag is to be displayed on the web page.
  • Clicking on the link will take us to the desired website.

eg:
        <a href="https://www.google.com"> Go to google</a>


    Here is an example how you add link to your website. The text Go to google will be displayed on the website page. Clicking on this text will take you to the URL " https://www.google.com ".

Adding a Email link to website-

  • To add a email link to website will take an attribute "mailto:" in <a> tag.
  • mailto will take argument as your mail.
eg:
        
    <a href= " mailto:hidden@gmail.com">email me</a>

The text  "email me" will be displayed on the web page. clicking on it will take to send email page.

Comments

Popular posts from this blog

Introduction To HTML

Adding Images in html

Div, Header, Footer and Main