简体   繁体   中英

How to add link to text in html (so when you click you go to a website)

I have the bellow code:

<div id="twoBtn" class="mainContainer"><!--two buttons-->
<p>Find us on the app store, or send us an email bellow!</p>
<!--<a href="#" id="btn1" class="button1">
    <img src="Resources/images/apple.png">
    <span>App Store</span>
  </a>-->
<a href="#" id="btn2" class="button2">
    <!--<img src="Resources/images/android.png">-->
    <span>Contact us</span>
  </a>

I would like the app store to be a link the user can click on. How can I do this?

The solution to your question would be

<div id="twoBtn" class="mainContainer"><!--two buttons-->
<p>
  Find us on the 
    <a href="#your_link" >
      app store
    </a>
  , or send us an email bellow!
</p>
<a href="#" id="btn2" class="button2">
<!--<img src="Resources/images/android.png">-->
    <span>Contact us</span>
</a>

It will make your "app store" a link and you can ssign classes and IDs to this a tag.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM