

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to use href attribute in HTML Page?
The href attribute in an HTML page is used to specify the URL for a page. If the href attribute is not present, then the <a> tag will not be considered as a hyperlink.
Just keep in mind the href attribute should get included as an attribute for <a> tag. It should be used inside the <body>…</body> tags.
Example
You can try the following code to make page links in an HTML page using the href attribute
<!DOCTYPE html> <html> <head> <title>HTML href attribute</title> </head> <body> <h1>Learn about the company</h1> <a href="/about/index.htm">About</a> <a href="/about/about_team.htm">Team</a> </body> </html>
Output
- Related Questions & Answers
- How to use image height and width attribute in HTML Page?
- HTML <link> href Attribute
- HTML <base> href Attribute
- HTML <area> href Attribute
- HTML <a> href Attribute
- How to use autocomplete attribute in HTML?
- How to use formnovalidate attribute in HTML?
- How to use formaction attribute in HTML?
- How to use formenctype attribute in HTML?
- How to use formtarget attribute in HTML?
- How to use list attribute in HTML?
- How to use multiple attribute in HTML?
- How to use pattern attribute in HTML?
- How to use placeholder attribute in HTML?
- How to use step attribute in HTML?
Advertisements