Welcome Guest! (App Version 3.1)
IntroductionHTML Tutorial What is HTML? My First Program in HTML Doctype Types of Elements Block Elements Inline Elements
Box ModelWhat is Box Model Content in Box Model Padding in Box Model Border in Box Model Margin in Box Model
HTML TagsDiv Tags H1 to H6 Tags Paragraphs Tags Span Tags Bold Tags Italic Tags
HTML UtilitiesAdding Images Adding Hyperlinks Adding Comments Types of Lists Tables Iframes Breaking Lines Horizontal Line
FormsForms in HTML Text-Box Radio Checkbox Select and Option Text Area Button Submit
HTML 5What is new in HTML5 Syntax Changes New Elements & Properties Semantic Tags New Elements New Input Types Graphics Support Canvas SVG Media Support Audio Video Client Side Storage Local Storage Session Storage Indexed DB Web SQL [dep] Cookies API Support Web Worker Web Sockets Service Worker App Cache [dep] SSE Drag & Drop Geolocation
HTML QuizHTML Quiz 1
hrefattribute mention the url of the target page.
Anchor tags are used to add hyperlinks to text or images in order for end user to navigate to any web page present on world-wide-web.
There may be cases where you want your users to click and go to some other page - that page might reside on your own website or it might direct to some other website like facebook, google, twitter, etc. So, here
anchor tag comes handy.
In anchor tags there is a property
href. In this property just add the website address where you want your users to go to (on clicking enclosed text or image) and add some text or image between the tags and then close the anchor tag.
<body> <!-- hyperlink to text --> <a href="http://www.google.com">Google</a> <!-- hyperlink to image --> <a href="http://www.google.com"> <img src="google.png" /> </a> </body>