In HTML, the tag <a> defines a hyperlink. It has the following syntax:
<a href="url"> Text </a>
For this tag, the most important attribute is the href attribute, which indicates the link's description.
The 'text' part in the syntax is the part that will be visible to the reader.
Here is an example of how you can use it:
<a href="https://www.google.com/">Google</a>
From the example above, the text 'Google', when clicked by the reader, will direct the reader to the Google site.
Say if you haven't thought of where to link the text to, here is where the hash, '#' symbol comes in handy. You can create a dead link as shown:
<a href="#">Google</a>
Nothing will happen if people click the text above.
Done!
No comments:
Post a Comment
Komen atau sebarang pertanyaan di sini :)