HTML - Formatting text, Creating Tables, List and Links

Chapter 11 · Tamil Nadu State Board

  • 15 min read
  • 6-question quiz

Every key point below shows the sentence from your textbook it comes from. Book back answers are solved and checked against the book; answers we could not prove are left out. How we check content

In short

This lesson teaches how HTML tags format text and how tables, lists, and links are created. It explains how different tags affect text and how table cells and list items are organised. It also shows how links connect to another part of the same document or to external web content. These skills help students build and organise web pages.

Written by AI from this lesson. How we check it

Key points

  • The b, i, and u tags display text in bold, italics, and underline, and are called physical style tags.
    From your textbook
    “These tags are otherwise known as “Physical Style” tags.”
  • The mark tag highlights text, while sub and sup place characters below or above the normal line.
    From your textbook
    “The <mark> tag is used to highlight the text in HTML.”
  • The table, tr, th, td, and caption tags help build tables, rows, headings, cells, and titles.
    From your textbook
    “<table> tag is used to create a table.”
  • HTML has ordered, unordered, and definition lists, each with a different way of presenting items.
    From your textbook
    “HTML supports three types of lists viz. numbered, unnumbered and definition.”
  • A nested list is a list block placed inside another list.
    From your textbook
    “A list block can be defined inside another list is called as nested list.”
  • The anchor tag and HREF attribute create links to web content, including internal and external destinations.
    From your textbook
    “The anchor tag <A> is used to create links along with HREF attribute.”
Test yourself: 6 questions

Formulas in this chapter

  • General form of the font tag<font face="font_name" size=value color=color_name / color_code> text </font>Explained here
  • Anchor tag structure<A href = “Web content path / URL”> Text – Clickable link </A>Explained here

HTML Text Formatting Tags

HTML formatting tags change how text looks or show what the text means. Most tags in this topic are container tags, so they have an opening tag and a closing tag. Choose a tag based on what the text is for, not only on how it looks.

Basic physical style tags

TagEffect
<b>...</b>Makes text bold
<i>...</i>Makes text italic
<u>...</u>Underlines text
<tt>...</tt>Shows text in old typewriter style with a fixed width font

Similar-looking tags with different uses

TagUse and display
<b>Shows text in bold
<strong>Marks important text and displays it in bold
<i>Shows text in italics
<em>Emphasizes text and displays it in italics
<u>Shows text as underlined
<ins>Marks inserted text and displays it as underlined
<s>Shows text as wrong with a strike-through
<del>Marks replaced or deleted text with a strike-through

Remember: Tags can look alike but have different purposes. Use the tag that matches the meaning you want to show.

Changing Text Size and Highlighting

Size and highlight tags

TagEffect
<big>...</big>Displays text bigger than normal size
<small>...</small>Displays text smaller than the current size
<mark>...</mark>Highlights text, mostly with a yellow default color

Use <big> to call attention to text by making it larger. Use <small> to make text smaller. The <mark> tag highlights its enclosed text so it stands out to the reader.

Subscript and Superscript

Definition

Subscript
A character or number shown below the normal line of type, using the <sub> and </sub> tags.

Definition

Superscript
A character or number shown above the normal line of type, using the <sup> and </sup> tags.

Subscript and superscript characters or numbers are usually smaller than the rest of the text. In H<sub>2</sub>O, the 2 is a subscript. In (a+b)<sup>2</sup>, the 2 is a superscript.

Remember: Use <sub> for text below the normal line and <sup> for text above it.

Showing Inserted, Deleted, and Wrong Text

Text change tags

TagMeaning and display
<del>...</del>Marks replaced or deleted text and displays it with a strike-through
<ins>...</ins>Marks inserted text and displays it underlined
<s>...</s>Shows text as wrong with a strike-through

These tags do not insert or remove text from the browser page. They mark text to show whether it is inserted, deleted, replaced, or wrong. The <s> and <del> tags both display a strike-through, but their uses differ.

Remember: Use <u> to underline text, and use <ins> when the text is marked as inserted.

Centering Text with the Center Tag

Use the <center> tag to place a segment of text in the center of the browser. It is a container tag, so place the text between <center> and </center>. Paragraphs can also be centered using the Align attribute with the <p> tag.

Definition

Container tag
A tag that surrounds content between an opening tag and a closing tag.

Worked example

How do you center the text Welcome to HTML?

Try it first, then show the solution
  1. Write <center> before the text.
  2. Write </center> after the text.

Answer: <center>Welcome to HTML</center>

Changing Font Style, Size and Color

The <font> tag changes the style, size and color of a short segment of text. A font is a named set of character and number styles. A browser uses its default system font when the requested font is unavailable.

General form of the font tag

<font face="font_name" size=value color=color_name / color_code> text </font>

face sets the font style, size sets the text size, and color sets the text color.

Font attribute rules

  • Put a font name containing multiple words inside double quotes.
  • The size attribute can use an absolute value from 1 to 7.
  • Each virtual size is 20% larger than the previous one.
  • The color can be given as a color name or a hexadecimal color code.

You can give several font names in the face attribute, separated by commas and placed inside double quotes. The browser tries them in order and uses the first supported font. If none is supported, it uses the default font.

Font choice in a list

SituationWhat the browser displays
A listed font is supportedText appears in the first supported font.
No listed font is supportedText appears in the default font.

Remember: The <font> tag is not supported by HTML5.

Section Breaks with the Horizontal Rule Tag

The <hr> tag separates sections visually by drawing a horizontal line across the browser. It is an empty tag and has no closing tag. Its attributes can change the line's thickness, width, 3D appearance and color.

Definition

Pixel
A tiny dot that helps make up the display on a computer.

Attributes of the <hr> tag

  • size changes the thickness of the line. The default size is 3 pixels.
  • width sets the line width in pixels or as a percentage. The default width is 100%.
  • noshade turns off the default 3D view and gives the line a 2D view.
  • color changes the default gray line to a chosen color name or color code.

Worked example

What does <hr width = 50%> do?

Try it first, then show the solution
  1. The <hr> tag draws a horizontal rule.
  2. The width attribute sets the rule to 50% of the browser width.

Answer: It displays a horizontal rule with 50% width.

Remember: The attributes of the <hr> tag are not supported by HTML5.

HTML Table Structure

An HTML table arranges information in rows and columns. The <table> tag creates the table, and <tr> creates each row. Tables use several tags, so every table element needs its closing tag.

Main table tags

  • <table> creates a table.
  • <tr> defines a table row.
  • <th> defines a heading cell.
  • <td> specifies data in a cell.
  • <caption> gives the table a title.
  • <thead>, <tbody> and <tfoot> define and control table sections.

The <caption> tag displays the table title. Text inside <th> appears bold and centered by default. Text inside <td> supplies the cell data.

Worked example

How does the Books and Authors table arrange its information?

Try it first, then show the solution
  1. The caption is Books and Authors.
  2. The first row uses <th> for Book, Author and Publisher.
  3. The following rows use <td> for book, author and publisher details.

Answer: The table has three column headings and rows of book details.

Table Attributes and Cell Merging

Attributes of the <table> tag

  • Cellspacing sets the space between cells. Its value is in pixels.
  • Cellpadding sets the space between cell contents and the border. Its value is in pixels.
  • Border sets the thickness of the table border. A value of zero displays no border; the default is Zero in most the browsers.
  • Bordercolor sets the colour of the border lines.
  • Align positions the table in the browser window. Left is the default; Right or center may also be used.
  • BGcolor sets the table background colour.
  • Height and Width set table dimensions in pixels or percentage.

Attributes of <TD>, <TH> and <TR>

  • Align sets horizontal content alignment. Left is the default; Right and Center are possible values.
  • VAlign sets vertical content alignment. Bottom is the default; Top and Middle are possible values.
  • Width sets a cell's width in pixels or percentage.
  • BGcolor applies a colour to a cell background. Background applies an image or picture.
  • Rowspan merges two or more cells in a row as a single cell.
  • Colspan merges two or more cells in a column as a single cell.

Merging table cells

AttributeUse
RowspanMerges two or more cells in a row as a single cell.
ColspanMerges two or more cells in a column as a single cell.

Remember: Use table attributes to control spacing, borders, colour and position. Use Rowspan and Colspan when cells need to be merged.

Ordered and Unordered Lists in HTML

HTML list types

List typeHow it works
Ordered ListUses <OL> and displays items in numerical or alphabetical order.
Unordered ListUses <UL> and displays items with bullet symbols.
Definition ListIs the third list type supported by HTML.

The <LI> tag marks each item in an Ordered List or Unordered List. Both <OL> and <LI> are container tags, but the usual practice is not to write the closing </LI> tag.

Ordered List attributes

  • Type changes the numbering style.
  • Start changes the starting point. Its value should be a decimal number, whatever numbering style is used.
  • The default starting point is 1.

Ordered List Type values

Type valueNumbering style
1Standard Arabic Numerals: 1,2,3,4,……………….
aLowercase letters: a, b, c, d, …………
AUppercase letter: A, B, C, D ………..
iLowercase Roman numerals: i, ii, iii, iv, v ……………
IUppercase Roman numerals: I, II, III, IV, V ………..

An Unordered List is surrounded by <UL> and </UL>. Its Type attribute changes the bullet style. A solid circle is the default bullet; the listed Type values also include Disc and Square.

Remember: Use <OL> for items in an order and <UL> for bulleted items. Type changes the style, while Start sets an Ordered List's starting point.

HTML Lists

HTML supports ordered lists, unordered lists, and definition lists. An unordered list can use different markers, such as square or circle. A definition list has no bullet or number.

Parts of a definition list

TagPurpose
<DL> ... </DL>Surrounds the definition list.
<DT> ... </DT>Contains a definition term.
<DD> ... </DD>Contains the definition description.

Definition

Nested list
A nested list is a list block placed inside another list.

List types

  • Ordered List: a numbered list.
  • Unordered List: a list with markers instead of numbers.
  • Definition List: a list with definition terms and descriptions.

HTML Links

A link connects a webpage to web content, such as another HTML document, a webpage, or multimedia content. To make a link, you need the target file name or URL and clickable text. The <A> tag uses the HREF attribute, short for “Hypertext Reference”.

Anchor tag structure

<A href = “Web content path / URL”> Text – Clickable link </A>

HREF gives the path or URL to open. The text between the tags is the clickable link.

Internal and external links

Link typeHow it works
Internal linkLinks to a particular section in the same document. The Name attribute marks the section, and a link can refer to it with a value such as #TN.
External linkLinks to an external webpage by giving its URL in the HREF attribute.

Default link colours

  • An unvisited link is underlined and blue.
  • A visited link is underlined and purple.
  • An active link is underlined and red.

Links can connect several pages. A main page can link to pages such as writer.htm, calc.htm, and impress.htm. Each of those pages can include a link back to master.htm.

HTML Formatting and Key Revision Points

Text formatting tags

  • <b> makes text bold, <i> makes it italic, and <u> underlines it. These are Physical Style tags.
  • <mark> highlights text to draw the reader’s attention.
  • <sub> and <sup> create subscript and superscript text.
  • <font> changes the style, size, and colour of text.

Definition

Font
A font is a named set of a particular style of characters and numbers.

The <hr> tag creates a Horizontal Rule, also called a Thematic Break. It visually separates sections of an HTML document. A table is a grid of rows and columns, and tables were officially introduced with HTML 3.2.

Remember: Remember the three HTML list types and the difference between internal links and external links.

HTML Text Formatting

Text formatting changes how text looks, such as its style or colour. Physical style tags include <b>, <i> and <u>. A font is a named set of character and number styles.

Definition

<strong>
The <strong> tag marks text as important.

Definition

<em>
The <em> tag gives text emphasis.

Definition

<mark>
The <mark> tag highlights text to call attention to it.

Definition

Thematic break
A thematic break is a division between sections of content.

Definition

Pixel
A pixel is a unit used to measure size.

The <sub> and <sup> tags display text as subscript and superscript. For example, the equation Pd = 2s – Q2 can use <sub> for d and <sup> for 2.

Remember: Use <mark> to highlight text, and remember that <sub> and <sup> mean subscript and superscript.

HTML Tables

Definition

Table
A table is a structure of rows and columns, made up of cells.

Definition

Cell
A cell is an individual box in a table.

Definition

Row
A row is a horizontal structure of a table.

Definition

Column
A column is a vertical structure of a table.

Definition

Border
A border is a line surrounding cells.

The core table tags are <table>, <tr>, <th> and <td>. The <tr> tag makes a row, while <th> and <td> are used for table cells. The <tfoot> tag is also used with tables.

Table cell tags

TagUse
<th>Table heading cell
<td>Table data cell

The <table> tag can have attributes that control the table's appearance. The <hr> tag creates a thematic break; its attributes can control how that break appears.

HTML Lists

Definition

Ordered List
An indented list that places numbers or letters before each item.

Definition

Unordered List
An indented list that places a bullet symbol before each item.

Definition

Definition List
A list that presents definition terms and their descriptions.

Ordered and unordered lists

<OL><UL>
Shows numbers or letters before itemsShows bullet symbols before items

A list can be placed inside another list. This is called a nested list. The start attribute is associated with an ordered list.

Main list types

  • Ordered list: numbers or letters
  • Unordered list: bullet symbols
  • Definition list: terms and descriptions

HTML Links

Definition

Link
A link connects to part of the same document or to an external document.

Definition

Hyperlink
A hyperlink is a link from a hypertext document.

Types of links

TypeConnection
Internal linkAnother part of the same document
Local linkAn internal link
External linkAnother hypertext document

HTML links create connections to web content. The href attribute is used with a link. An internal link can connect a main page to another part of the same document.

Remember: Use href for a link. Internal links stay within the same document; external links connect to another hypertext document.

Questions students ask

Short, direct answers to what students search for in this chapter.

What are the HTML tags for bold, italic, and underline?

Use <b>...</b> to make text bold, <i>...</i> to make it italic, and <u>...</u> to underline it. These are container tags, so each needs a closing tag.

What is the difference between <b> and <strong> in HTML?

Both display text in bold. The <b> tag is used to show bold text, while <strong> marks text as important. Choose <strong> when importance is the intended meaning.

How do you write subscript and superscript in HTML?

Use <sub> and </sub> around text that should appear below the normal line. Use <sup> and </sup> around text that should appear above it. For example, the 2 in H<sub>2</sub>O is a subscript.

What is the difference between the <ins> and <u> tags?

Both display text as underlined, but they have different uses. <u> shows underlined text. <ins> marks text as inserted. Use the tag that matches the meaning you want to communicate.

What do the HTML tags <del> and <s> do?

Both display text with a strike-through. The <del> tag marks replaced or deleted text. The <s> tag shows text as wrong. Their display is similar, but their purposes are different.

How do I center text in HTML using the center tag?

Place the text between <center> and </center>. For example, <center>Welcome to HTML</center> centers the text in the browser. The <center> tag is a container tag because it surrounds the content it affects.

Show 19 more questions

What are the face, size and color attributes in the font tag?

The face attribute sets the font style, size sets the text size, and color sets the text color. The size attribute can use an absolute value from 1 to 7. For color, use a color name or a hexadecimal color code.

How does the browser choose a font from a list in HTML?

The browser checks the font names in the face attribute in order. It displays the text in the first font it supports. If it does not support any font in the list, it displays the text in the default font.

What does the hr tag do in HTML?

The <hr> tag draws a horizontal line to separate sections of an HTML document visually. It is an empty tag, so it has no closing tag. Its attributes can change the line's thickness, width, 3D appearance and color.

How can I change the width and thickness of an hr line?

Use the width attribute to set the horizontal width and the size attribute to set thickness. Width may be given in pixels or as a percentage; 100% is the default. The default size is 3 pixels.

What are the main HTML tags used to create a table?

The main table tags are <table>, <tr>, <th>, <td> and <caption>. The <table> tag creates the table, <tr> defines rows, <th> defines heading cells, <td> specifies cell data, and <caption> gives the table its title.

What is the difference between Rowspan and Colspan in HTML?

Rowspan merges two or more cells in a row as a single cell. Colspan merges two or more cells in a column as a single cell. These attributes are used with table cells when a table needs merged cells.

What does the Cellpadding attribute do in an HTML table?

Cellpadding sets the space between the contents of a cell and its border. Its value should be in pixels. Cellspacing is different: it sets the space between cells in a table.

How do you change the numbering style of an HTML Ordered List?

Use the Type attribute with <OL> to change the numbering style. Values include 1 for standard Arabic numerals, a or A for letters, and i or I for Roman numerals. The Start attribute changes where the list begins.

How do you make an Unordered List in HTML?

Surround the list items with <UL> and </UL>. Use <LI> for each item. An Unordered List uses bullet symbols instead of ordered numbering, and a solid circle is the default bullet style.

What are the three types of lists in HTML?

The three types are Ordered List, Unordered List, and Definition List. An Ordered List is numbered. An Unordered List uses markers. A Definition List has definition terms and descriptions, with no bullet or number.

How do you create a definition list in HTML?

Surround a definition list with <DL> and </DL>. Put each definition term between <DT> and </DT>, and place its description between <DD> and </DD>. Definition lists do not use bullets or numbers.

What is the difference between an internal link and an external link in HTML?

An internal link points to a particular section within the same document. The section is marked using the Name attribute, and the link can refer to it with a value such as #TN. An external link points to an external webpage using its URL in HREF.

What do HREF and the A tag do in HTML?

The <A> tag creates a hyperlink, and its HREF attribute gives the path or URL of the content to open. The text placed between the opening and closing <A> tags becomes the clickable link.

What are the default colours of unvisited, visited, and active HTML links?

By default, an unvisited link is underlined and blue. A visited link is underlined and purple. An active link is underlined and red. These default colours can be changed using CSS.

What are physical style tags in HTML?

Physical style tags change how text is displayed. Examples include <b>, <i> and <u>. These tags display text in bold, italic and underlined styles. The <mark> tag highlights text, while <strong> and <em> mark text as important and emphasised.

What is the difference between <UL> and <OL> tags?

The <UL> tag creates an unordered list, which places a bullet symbol before every item. The <OL> tag creates an ordered list, which places numbers or letters before every item. Both tags create indented lists.

What are the main types of list in HTML?

HTML has three main list types: ordered lists, unordered lists and definition lists. Ordered lists use numbers or letters. Unordered lists use bullet symbols. Definition lists show terms along with their descriptions.

What is a nested list in HTML?

A nested list is a list placed inside another list. The inner list is contained within an item of the outer list. HTML lists can therefore show items and sub-items in a structured way.

What is the difference between an internal link and an external link?

An internal link connects to another part of the same document. A local link is another name for an internal link. An external link connects to another hypertext document. The href attribute is used with links.

Book back answers

22 textbook exercises, solved and checked against the book. Questions we could not prove are left out.

Choose the correct answer

  1. Which of the following tags are called as physical style tags?

    • (A) <html>, <b>, <br>
    • (B) <b>, <br>, <u>
    • (C) <A>, <b>, <i>
    • (D) <b>, <i>, <u>
    Try it, then show the answer

    (D) <b>, <i>, <u>

    The chapter identifies <b>, <i> and <u> as physical style tags.

    From the book: “These tags are otherwise known as “Physical Style” tags.”

  2. Which feature is used to call attention to the reader?

    • (A) Highlight
    • (B) Bold
    • (C) Italics
    • (D) Underline
    Try it, then show the answer

    (A) Highlight

    The chapter says highlighting is used to call attention to the reader.

    From the book: “Highlighting is an important formatting feature is used to call attention to the reader.”

  3. The tags <sub> and <sup> used for:

    • (A) Subject and Super
    • (B) Subscript and Super
    • (C) Subject and Superscript
    • (D) Subscript and Superscript
    Try it, then show the answer

    (D) Subscript and Superscript

    <sub> creates a subscript and <sup> creates a superscript.

    From the book: “The <sub> and <sup> tags are used to create subscript and superscripts respectively.”

  4. A named set of certain style of character and number is:

    • (A) Style
    • (B) Character
    • (C) Font
    • (D) List
    Try it, then show the answer

    (C) Font

    The chapter defines a font as a named set of a particular style of characters and numbers.

    From the book: “A font is a named set of certain style of character and number.”

All 22 book back answers →

Practice

Question 1 of 6Score 0

Which tag is used to highlight text?

Exam questions

Practice questions with model answers. These are not from an official paper.

How do the <sub> and <sup> tags display text?2 marks

The <sub> tag displays text below the normal line as a subscript. The <sup> tag displays text above the normal line as a superscript.

Name the core tags used to create a table and state what <tr> and <td> do.2 marks

The core tags are <table>, <tr>, <th>, <td>, and <caption>. The <tr> tag defines a table row, and <td> specifies data in a cell.

What is the difference between an ordered list and an unordered list?2 marks

An ordered list presents items in numerical or alphabetical order. An unordered list presents items with bullet symbols.

Explain how an internal link is created.2 marks

An internal link connects to a particular section of the same document. The anchor tag is used with a name attribute to establish the destination, and a link can point to it.

Watch out

  • Do not confuse tags that look similar: <strong> indicates important text, while <b> simply displays bold text.
  • Do not confuse an internal link, which points within the same document, with an external link to another web page.

Still stuck on this lesson?

Get an AI answer grounded in your actual textbook — with the exact page reference.

Ask AI about this topic →