0% found this document useful (0 votes)
2 views

HTML_Tags_and_Attributes_Complete_Notes

The document provides an overview of various HTML tags and their attributes, focusing on the <FONT> tag for text customization, list tags for organizing information, and multimedia elements like images and scrolling text. It also covers hyperlinks, anchor tags, and the <TABLE> tag for data organization. Each section includes examples to illustrate the usage of the tags and their attributes.

Uploaded by

Sumit Sharma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

HTML_Tags_and_Attributes_Complete_Notes

The document provides an overview of various HTML tags and their attributes, focusing on the <FONT> tag for text customization, list tags for organizing information, and multimedia elements like images and scrolling text. It also covers hyperlinks, anchor tags, and the <TABLE> tag for data organization. Each section includes examples to illustrate the usage of the tags and their attributes.

Uploaded by

Sumit Sharma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

HTML Tags and Attributes Notes

2.7. FONT Tag and Attributes (COLOR, FACE, and SIZE)

The <FONT> tag is used in HTML to specify the appearance of the text.

It allows customization of font color, face (typeface), and size.

Syntax: <FONT COLOR="color" FACE="fontname" SIZE="size">Text</FONT>

Attributes:

- COLOR: Specifies the color of the text.

Example: <FONT COLOR="red">This is red text.</FONT>

- FACE: Defines the font style/typeface of the text.

Example: <FONT FACE="Arial">This is Arial text.</FONT>

- SIZE: Sets the size of the text (ranges from 1 to 7, with 3 as default).

Example: <FONT SIZE="5">This is larger text.</FONT>

2.8. List Tags and Attributes

HTML provides various types of lists for presenting information:

1. Ordered List (<OL>): Numbered list.

2. Unordered List (<UL>): Bulleted list.

3. Definition List (<DL>): List of terms and definitions.

Each list type has its specific tags and attributes.


HTML Tags and Attributes Notes

2.8.1. Ordered List: OL, LI, and OL Attributes

- Ordered List (<OL>): Creates a numbered list.

- List Item (<LI>): Represents each item in the list.

Attributes of <OL>:

- TYPE: Defines the numbering style.

- `1` (default): 1, 2, 3, ...

- `A`: A, B, C, ...

- `a`: a, b, c, ...

- `I`: I, II, III, ...

- `i`: i, ii, iii, ...

Example: <OL TYPE="A"><LI>Item 1</LI><LI>Item 2</LI></OL>

- START: Specifies the starting number.

Example: <OL START="5"><LI>Item 1</LI></OL>

- VALUE: Assigns a specific number to a list item.

Example: <LI VALUE="10">Item 10</LI>

2.8.2. Unordered List: UL, LI, and UL Attributes

- Unordered List (<UL>): Creates a bullet list.

Attributes of <UL>:

- TYPE: Defines the bullet style.

- `disc` (default): ?

- `circle`: ?
HTML Tags and Attributes Notes

- `square`: ?

Example: <UL TYPE="square"><LI>Item 1</LI><LI>Item 2</LI></UL>

2.8.3. Definition List: DL, DT, DD

- Definition List (<DL>): Creates a list of terms and their descriptions.

- Definition Term (<DT>): Represents the term being defined.

- Definition Description (<DD>): Represents the definition.

Example:

<DL>

<DT>HTML</DT>

<DD>HyperText Markup Language</DD>

<DT>CSS</DT>

<DD>Cascading Style Sheets</DD>

</DL>

2.9. Inserting IMAGES and OBJECTS

HTML allows adding multimedia elements like images and objects to web pages.

2.9.1. Images: IMG; Attributes

The <IMG> tag is used to insert images in HTML.


HTML Tags and Attributes Notes

Attributes:

- ALIGN: Aligns the image relative to text (left, right, top, middle, bottom).

Example: <IMG SRC="image.jpg" ALIGN="right">

- SRC: Specifies the path or URL of the image.

Example: <IMG SRC="image.jpg">

- WIDTH and HEIGHT: Sets the dimensions of the image.

Example: <IMG SRC="image.jpg" WIDTH="300" HEIGHT="200">

- ALT: Displays alternative text if the image cannot load.

Example: <IMG SRC="image.jpg" ALT="Image not found">

2.10. MARQUEE Tag and Attributes

The <MARQUEE> tag is used to create scrolling text or images.

Attributes:

- DIRECTION: Specifies the scroll direction (left, right, up, down).

Example: <MARQUEE DIRECTION="up">Scrolling text</MARQUEE>

- BEHAVIOR: Defines the scrolling type (scroll, slide, alternate).

Example: <MARQUEE BEHAVIOR="alternate">Alternate scrolling</MARQUEE>

2.11. HYPERLINK and Anchor Tag

Hyperlinks in HTML are created using the <A> tag. It connects web pages or resources.
HTML Tags and Attributes Notes

Attributes of <A>:

- HREF: Specifies the URL.

Example: <A HREF="https://example.com">Visit Example</A>

- TARGET: Opens the link in a new tab (_blank) or same tab (_self).

Example: <A HREF="page.html" TARGET="_blank">Open in new tab</A>

Internal Links:

<A HREF="#section">Jump to section</A>

<A NAME="section">Section here</A>

2.12. TABLE Tag

The <TABLE> tag organizes data into rows and columns.

Attributes:

- BORDER: Sets table border size.

- CELLPADDING: Space inside cell borders.

- CELLSPACING: Space between cells.

Example:

<TABLE BORDER="1">

<TR>

<TH>Name</TH><TH>Age</TH>

</TR>

<TR>

<TD>John</TD><TD>25</TD>
HTML Tags and Attributes Notes

</TR>

</TABLE>

You might also like