Formatting Text
Total Page:16
File Type:pdf, Size:1020Kb
Class VII Subject: Computer Science Textbook: IT Planet Petabyte Chapter – 8: HTML – Creating Web Page 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 Typewriter Style Text Changing the Alignment of Heading Changing the Paragraph Alignment Changing Font 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 <b> tag. The tag uses both opening and closing tags. The text that needs to be made bold must be within <b> and </b> tags. Making text Italic: The <i> tag is used to italicise the text. It opens with <i> and ends with </i> tag. Underlined Text Anything that appears within <u>...</u> element, is displayed with an underline. Strike Text Anything that appears within <strike>...</strike> element is displayed with a strikethrough, which is a thin line through the text. Superscript Text The content of a <sup>...</sup> 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 <sub>...</sub> 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 - <tt> tag HTML <tt> tag is used to define the text in monospaced font or fixed-width fonts so that it would render as teletype, text-only screen, or line printer on the browser. HTML - <h1> to <h6> align Attribute The HTML <h1> to <h6> align attribute is used to specify the alignment of the <h> element or the content present inside the Heading Element. Syntax: <h1 align="left | right | center"> 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 paragraphs. Syntax: <p align="left | right | center | justify"> 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 | <font> face Attribute The HTML <font> face Attribute is used to specify the font family of the text inside <font> element. Syntax: <font face="font_family"> Attribute Values: It contains the font like Arial. HTML | <font> size Attribute The HTML <font> size Attribute is used to specify the size of text which is present inside <font> element. Syntax: <font size="number"> 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 <body> text Attribute is used to define a color for the text in the document. Syntax: <body text="color_name”> Attribute Values color_name: It specifies the name of the color for the text in the document. HTML | <font> color Attribute The HTML <font> color Attribute is used to specify the text color inside the <font> element. Syntax: <font color="color_name”> Attribute Values: color_name: It sets the text color by using color name. For example: “red”. The HTML <body> bgcolor Attribute It is used to define the background color of a document. Syntax: <body bgcolor="color_name”> Attribute Values: color_name: It specifies the name of the background color of the document. MIND MAP ADDITIONAL RESOURCE: Refer to the given YouTube Links for further explanation of some tags. 1. https://youtu.be/rmqyIN3KvA8 The Bold, Italic and Underline tags 2. https://youtu.be/wymR_DROKAA Superscript and Subscript 3. https://youtu.be/PidJr8XIOB4 Align attribute 4. https://youtu.be/YRHDBh9i61A Font tag 5. https://youtu.be/ItTtU5mIzHo Change the background color of a web page 8 HTML - Creating Web Page A. Tick [ü] the correct answer. 1. a. 2. b. 3. a. 4. c. 5. a. B. Write ‘T’ for True and ‘F’ for False statements. 1. F 2. F 3. T 4. T 5. F C. Fill in the blanks. 1. DOCTYPE 2. <wbr> 3. BGCOLOR 4. COLOR 5. <H1>, <H6> 6. Comment D. Differentiate between the following. Physical Style Formatting: They specify a particular font change that is interpreted strictly by all browsers. For example, to ensure that text appears in bold font, we would enclose it between a start <b> and end </b> tag. Logical Style Formatting: They allow a browser to interpret the tag based on browser settings, relative to other text on a web page. For example, <h2> heading tag indicates that the heading text should be larger than the regular text but smaller than text formatted using an <h1> heading tag. E. Answer in 1-2 sentences. 1. HTML (HyperText Markup Language) is a programming language used to create web pages. It is simply a collection of certain keywords called tags. 2. <BR> tag is used to add blank lines between the paragraphs and is also used to start a new line. 3. Font tag is used to change the appearance of our text along with the FACE attribute. 25 F. Answer Briefly. 1. The elements included in the structure of HTML5 document are such as: <DOCTYPE>, <HTML>, <HEAD>, <TITLE> and <BODY> that we must add to every web page we create. 2. Metadata means ‘data about data.’ On a web page, metadata can include author information, the type of editor used to create the page, a description of the content, relevant keywords, and copyright information. 3. We should specify more than one font while changing the font, as it comes handy if one font is missing on a user's computer, the text can be displayed with another font you have specified. G. Application Based Question. Rishabh should save the file with .html file extension then he would be able to open the HTML file in the web browser. 26.