In this article, we will perform the task of how to include anchors in HTML. Let’s dive into this article to understand anchors in HTML.
The anchor element is used to link the source anchor to the target anchor. The target is the resource to which the source anchor is connected, while the source is the text, image, or button that points to another site.
Hyperlinks are one of the key technologies that make the Internet an information highway.
To better understand how to include anchors in HTML, let’s look at the following example
In the example below, we will create aJump Anchorlink.
Tutorials Point
Tutorials Point originated from the idea that there exists a class of readers who respond better to online content and prefer to learn new skills at their own pace from the comforts of their drawing rooms.The journey commenced with a single tutorial on HTML in 2006 and elated by the response it generated, we worked our way to adding fresh tutorials to our repository which now proudly flaunts a wealth of tutorials and allied articles on topics ranging from programming languages to web designing to academics and much more.
Click To Jump.
When running the above script, an output window will pop up showing the text used in the above script and the mentioned anchor tag "Click to jump", which allows the user to jump to the page when pressed start.
Considering the following scenario, we are creating an example of linking to an anchor from another web page.
TutorialsPoint
Tutorials Point originated from the idea that there exists a class of readers who respond better to online content and preferto learn new skills at their own place from the comforts of their drawing rooms.
When the script is executed, it will generate an output showing the text used in the above script and the link attached to the web page using anchor tags. When the user clicks on the link, it opens a new page.
Look at the following example where we will create a link to javascript.
Click To Execute
When the given script is executed, it will provide an output that includes a link placed on the web page using an anchor with the text "Click to execute".
If the user clicks on the link, the script is triggered and the warning "Welcome to Tutorial Point" is displayed.
The above is the detailed content of How do we include an anchor in HTML?. For more information, please follow other related articles on the PHP Chinese website!