Aug 30, 2026

Introduction: Anchor Tag | Link Tag

Link Tag and Attribute

📝 Web documents have link (or hyperlink) that take you from one web page to another. 

Links are created using an <a> element (the a stands for anchor). 

 For example, 

<p>< a href="bapispage.blogspot.com" > Click here to visit Bapis Page.</a></p> 

In the above paragraph, the < a > element that creates the link. Between the opening <a> tag and the closing </a> tag is the text that you can click on, which says “Click here to visit Bapis Page.” 

In this case, it's the href attribute; this is followed by an equal sign, and then a pair of quotation marks which contain the URL (https://www.bapispage.blogspot.com, it's value) for "Bapis Page". 

If you wanted the link to open in a new window, use target attribute  and the value is "_blank. 

E.g.  

< a href="https://www.bapispage.blogspot.com" target="blank"> 

📝 This illustrates that elements can carry several attributes, although an element should never have two attributes of the same name. 

Introduction: HTML head | HTML body

 <html> 

 <head> 

<title> My First Page</title>

 </head> 

 <body> 

 < h1 > First Page! < /h1 > 

 <p>First Paragraph!</p > 

 <p> 2nd Paragraph </p>

 </body > 

 </html>

 Whenever we write a web page, the whole of the page is contained between the opening <html> and closing </html> tags. 

Inside the < html > element, there are two main parts to the page: