<<

Class VII

Subject: Computer Science

Textbook: IT Planet Petabyte

Chapter – 8: HTML – Creating Web

General Instructions:

1. Read the text thoroughly. 2. Exercise to be done in the book. 3. YouTube links are given at the end of the notes for further clarification of the usage of tags.

Formatting Text Bold, Italic and Underline Text Strike, Subscript, Superscript and Style Text Changing the Alignment of Heading Changing the Alignment Changing of Text Changing the Size of Font Changing the Color of Text Changing the Color of a Part of Text Changing Background Color of the Page

HTML Formatting

HTML Formatting is a process of formatting text for a better look and feel. There are many formatting tags in HTML.

In HTML the formatting tags are divided into two categories:

Physical style tags: These tags specify a particular font change that is interpreted strictly by all browsers. Logical style tags: These tags allow a browser to interpret the tag based on browser settings, relative to other text on a web page.

Making text Bold: We can make the text bold using the tag. The tag uses both opening and closing tags. The text that needs to be made bold must be within and tags.

Making text Italic: The tag is used to italicise the text. It opens with and ends with tag.

Underlined Text

Anything that appears within ... element, is displayed with an underline.

Strike Text

Anything that appears within ... element is displayed with a , which is a thin through the text.

Superscript Text

The content of a ... element is written in superscript; the font size used is the same size as the characters surrounding it but is displayed half a character's height above the other characters.

Subscript Text The content of a ... element is written in subscript; the font size used is the same as the characters surrounding it, but is displayed half a character's height beneath the other characters. HTML - tag HTML tag is used to define the text in or -width so that it would render as teletype, text-only screen, or line printer on the browser. HTML -

to
align Attribute The HTML

to

align attribute is used to specify the alignment of the element or the content present inside the Heading Element. Syntax:

Attribute Values: • left: It sets the content to the left-align. • right: It sets the content to the right alignment. • center: It sets the content to the center. Changing the Paragraph Alignment Align Attribute is used to control the horizontal positioning or alignment of the . Syntax:

Attribute Values: • left: It sets the content to the left-align. • right: It sets the content to the right alignment. • center: It sets the content to the center. • Justify: It aligns the text on both the left and the right margins. HTML | face Attribute The HTML face Attribute is used to specify the of the text inside element. Syntax: Attribute Values: It contains the font like . HTML | size Attribute The HTML size Attribute is used to specify the size of text which is present inside element. Syntax: Attribute Values: It contains a single value number that specifies the size of the text. The font size lies between 1 to 7. HTML | body text Attribute The HTML text Attribute is used to define a color for the text in the document. Syntax: Attribute Values: color_name: It sets the text color by using color name. For example: “red”. The HTML bgcolor Attribute It is used to define the background color of a document. Syntax: html file extension then he would be able to open the HTML file in the web browser.

26