<img src="images/nature.png" / >
For Example. We want to assign 100px height and width to an image. Then these height and width attributes will written as:
<img src="image/nature.png" height="100" width="100" />
is the anchor tag .On click the link , It redirect the user to other page.
For a link that will redirect the user to some location or some page , we will use anchor tag. Address location can be assign by using the href attribute in tag .
<a href="https://google.com" > Google Search </a>
Complete Code:
Lets try .
<html>
<head>
<title>HTML Tag Attribute</title>
</head>
<body>
<img src="image/nature.png" border="1" height="100" width="100" />
<a href="https://google.com" > Google Search </a>
<a href="https://google.com" target="_blank" > Google Search In New Tab </a>
</body>
</html>
Follow the Chapter Sequence , You can Learn HTML in our short Course.
Our Chapters are easy,short and cover all the contents of the HTML language.