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

HTML Class-2 (Background & Text)

This document discusses HTML body formatting and text formatting. It provides syntax examples for setting the body background color and image. It also provides syntax examples for bold, strong, italic, emphasized, underline, insert, small, mark, delete, strikethrough, subscript and superscript HTML text formatting tags.

Uploaded by

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

HTML Class-2 (Background & Text)

This document discusses HTML body formatting and text formatting. It provides syntax examples for setting the body background color and image. It also provides syntax examples for bold, strong, italic, emphasized, underline, insert, small, mark, delete, strikethrough, subscript and superscript HTML text formatting tags.

Uploaded by

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

A Unit of Hindustan Soft Education Ltd.

www.oxfordinstitute.in

HTML CLASS – 2 (Background & Text)


HTML Body Formatting
Body Element:
• It is a container element.
• The body element defines the webpage body.
Syntax:
<body> … </body>
Body Background Color:
• It defines the background color of webpage.
Syntax:
<body bgcolor=”Color_Name/Code”> … </body>
Body Background Image:
• It defines the background image of webpage.
• User can place any kind of image on webpage background using URL and
Name of image.
Syntax:
<body background=”Url of Img”> … </body>
How to get URL of image?
1. Select any image.
2. Right click on image-> Open with-> Google Chrome
3. Copy the link from URL bar. (E.g.:
file:///C:/Users/Public/Pictures/Sample%20Pictures/Penguins.jpg)
4. Paste in your code.

Imparting knowledge since 1997…


A Unit of Hindustan Soft Education Ltd.
www.oxfordinstitute.in

HTML Text Formatting


1. Bold: Define bold text, without extra importance.

Syntax: <b> Text> </b> TEXT

2. Strong: Defines text with strong importance. The content inside is typically
displayed in bold.

Syntax: <Strong> Text </strong> TEXT

3. Italic: Defines a part of text in an alternate voice or mood (e.g. a thought, a


ship name, etc.) The content inside is typically displayed in italic.

Syntax: <i> Text </i> TEXT

4. Emphasized: Defines emphasized text. The content inside is typically


displayed in italic.

Syntax: <em> Text </em> TEXT

5. Underline: Define the underline under text.

Syntax: <u> text </u> TEXT

6. Insert: Defines a text that has been inserted into a document. Browsers will
usually underline inserted text.

Syntax: <ins> Text </ins> TEXT

7. Small: Defines smaller text.

Syntax: <small> Text </small> TEXT

Imparting knowledge since 1997…


A Unit of Hindustan Soft Education Ltd.
www.oxfordinstitute.in

8. Mark: Defines text that should be marked or highlighted.

Syntax: <mark> Text </mark> TEXT

9. Delete: Defines text that has been deleted from a document. Browsers will
usually strike a line through deleted text.

Syntax: <del> Text </del> TEXT

10.Strikethrough: Defines text that has been strike. Browsers will usually strike
a line through deleted text.

Syntax: <s> Text </s> TEXT

11.Sub: Defines subscript text. Subscript text appears half a character below
the normal line, and is sometimes rendered in a smaller font. Subscript text
can be used for chemical formulas, like H2O.

Syntax: <sub> Text </sub> H2O

12.Sup: Element defines superscript text. Superscript text appears half a


character above the normal line, and is sometimes rendered in a smaller
font. Superscript text can be used for footnotes, like WWW[1] .

Syntax: <sup> Text </sup> 10TH

Imparting knowledge since 1997…

You might also like