HTML href is abbreviated as hypertext reference. This is the attribute that is available inside the anchor [
2. : This tag is used for specifying the URL of the page where the link has to go within the href attribute.
cú pháp
3. : This tag is used for specifying the base URL of all relative page URLs where the link has to go within the href attribute.
cú pháp
4. : This tag is used for specifying external file location like styles.css, javascript.js etc. within href attribute.
cú pháp
Ví dụ để triển khai thẻ href trong HTML
Dưới đây là các ví dụ khác nhau
Gói phát triển phần mềm tất cả trong một[hơn 600 khóa học, hơn 50 dự án]
The tag with href attribute URLs
- Duplicate Checker
- EDUCBA
- Gmail
đầu ra
Example #2 – tag with href Attribute
Mã số
href attribute
p
{
color: fuchsia;
border: 2px solid orange;
font-size: 22px;
}
h1
{
color: red;
text-align: center;
}
The tag with href attribute introduction
HTML href is abbreviated as hypertext reference. This is the attribute which is available inside the anchor [] tag. This href is used for website URLs like www.google.com, www.gmail.com, www.facebook.com etc.
Real time Example: Day to day life we have accessed so many websites. Have you ever think about how would we access this website URLs? Because of href tag we can access any website URLs. We simply required website within this double quotes [href="website"] of href attribute.
The tag with href attribute URLs Example