href (hyper reference) attribute contains the address of external resources.
a element defines a link that connects the current page with the other pages of the site. a means anchor between two resources.
We can make text links by using the text as the content of a tag.
<a href="https://www.web4college.com/" title="web4college"> Go to web4college </a>Try </>
href attribute specifies the address of the linked resource. title attribute defines the nature of the link.
We can also make image links by using the image as the content of a tag.
<a href="https://www.web4college.com/" title="web4college"> <img src="files/logo.png" /> </a>Try </>
img element adds an image in the page. src attribute specifies the location of the image.
base element represents the document base URL. It is the basic URL for all of the links that are empty i.e. links that don't have URL.
<head> <base href="http://www.google.com" target="_blank"> </head>Try </>
link element links the current page to the other documents. link element should be placed in the <head> tag.
<head> <link rel="stylesheet" href="files/test.css"> </head>Try </>
In the above example, the file test.css styles the div block.
Was this article helpful?