0% found this document useful (0 votes)
7 views3 pages

HTML Tags Notes

This document provides an overview of three HTML tags: <img> for embedding images, <font> for text styling (now deprecated), and <a> for creating hyperlinks. It includes details on their attributes and examples of usage. The conclusion emphasizes the importance of these tags in enhancing webpage functionality and user experience.

Uploaded by

Lieo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views3 pages

HTML Tags Notes

This document provides an overview of three HTML tags: <img> for embedding images, <font> for text styling (now deprecated), and <a> for creating hyperlinks. It includes details on their attributes and examples of usage. The conclusion emphasizes the importance of these tags in enhancing webpage functionality and user experience.

Uploaded by

Lieo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

HTML Tags: <img>, <font>, <a> (Hyperlink)

Introduction to HTML Tags

HTML (HyperText Markup Language) is the standard language for creating webpages. It uses various tags to

define elements such as text, images, and links. This document covers:

- <img> - Image tag

- <font> - Font formatting tag (deprecated)

- <a> - Anchor (hyperlink) tag

1. Image Tag: <img>

The <img> tag is used to embed images into a webpage. It is a self-closing tag.

Attributes:

- src: Specifies the image path (URL or local file)

- alt: Provides alternate text

- width and height: Define image size.

Image Example:

<img src="cat.jpg" alt="Cute Cat" width="300" height="200">

2. Font Tag: <font>

The <font> tag is used to change the font style, size, and color. It is deprecated in HTML5.

Attributes:

- color: Sets the text color

- size: Font size (1 to 7)

- face: Font type.

Font Example:

<font color="red" size="5" face="Verdana">This is styled text</font>


HTML Tags: <img>, <font>, <a> (Hyperlink)

3. Hyperlink Tag: <a>

The <a> tag defines a hyperlink.

Attributes:

- href: Specifies the link destination

- target="_blank": Opens the link in a new tab.

Hyperlink Example:

<a href="https://www.google.com" target="_blank">Visit Google</a>

Complete Example Program:

<!DOCTYPE html>

<html>

<head>

<title>HTML Example</title>

</head>

<body>

<h2>My Web Page</h2>

<img src="cat.jpg" alt="Cute Cat" width="300" height="200">

<p><font color="blue" size="4" face="Arial">Welcome to my website!</font></p>

<p>Visit <a href="https://www.wikipedia.org" target="_blank">Wikipedia</a> for more info.</p>

</body>

</html>

Conclusion
HTML Tags: <img>, <font>, <a> (Hyperlink)

The <img> tag adds visual content.

The <font> tag styles text (CSS preferred now).

The <a> tag creates navigation links.

These tags enhance both the functionality and user experience of webpages.

You might also like