Anchor tag:
- It is used to define a hyperlink that links to another page or files or location.
- The “href” attribute is used to provide the address of link.
<!DOCTYPE> <html> <body> <a href=”https://www.gmail.com”>Gmail</a> <a href=”https://www.google.com”>Google</a> <a href=”https://www.youtube.com”>Youtube</a> </body> </html> |
We can create links to images also:
<!DOCTYPE> <html> <body> <a href=”https://www.gmail.com”> <img src=”gmail.png”/> </a> <a href=”https://www.google.com”> <img src=”gmail.png”/> </a> </body> </html> |
HTML Comments: The text placed in between <!– … –> tags. Comment text will not execute by the browser. Comments are used to explain a statement or block of code.
<!DOCTYPE html> <html> <body> <p>Welcome to Web</p> <!– <p> indicates paragraph –> </body> </html> |