Top Banner
Unit 4 – Text in HTML Presentation 3 Web Programming
17

M02 un04 p03

Jan 20, 2015

Download

Technology

Intan Jameel

 
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: M02 un04 p03

Unit 4 – Text in HTML

Presentation 3

Web Programming

Page 2: M02 un04 p03

Objectives

At the end of this presentation, you will be able to• Display the text as superscript and subscript• Align the text to the centre of a page• Pre-Format a text• Strike out a text

Page 3: M02 un04 p03

Subscript and Superscript

x2+2x+12=0

Superscript

H2O

Subscript

Page 4: M02 un04 p03

Hand-On!

• Open the HTML file SupSub.HTML in C:\HTML\Unit4\ Hands On Folder

• This HTML document display the Subscript and Superscript in a Webpage.

• The output is shown in the next slide:

Page 5: M02 un04 p03

Hand-On! (Contd..)

Page 6: M02 un04 p03

Superscript

• The text is displayed slightly above the line of preceding text.

• Comparatively small• Should be enclosed between <SUP> and

</SUP> tags.• Example:

x<SUP> 3 </SUP> + x<SUP> 2 </SUP>

Page 7: M02 un04 p03

Subscript

• The text is displayed slightly below the line of preceding text.

• Comparatively small• Enclosed between <SUB> and </SUB> tags.• Example:

H<SUB>2</SUB>O

Page 8: M02 un04 p03

Centre

• Displays the text is in the centre of the row.• Enclosed between <CENTER> and

</CENTER> tags.• Example:

<CENTER>

This text appears at the centre of the line

</CENTER>

Page 9: M02 un04 p03

Pre-Formatted Text and Strikeout

• The text within the <PRE> tag will be displayed in the browser window in the same format as it is presented in the HTML document.

• A text can be stroked out using the <STRIKE> tag.

Page 10: M02 un04 p03

Hands-On!

• Open the HTML file Strike.HTML in C:\HTML\Unit4\ Hands On Folder .

• This HTML document describe the use of the <PRE> and <STRIKE> tags

Page 11: M02 un04 p03

Lab Exercise

5. Open D4_5.html in Internet Explorer.

a. Identify the tag, which is used for display the output in superscript?

b. Underline the tag, which is used for display the output in subscript?

c. Name the tag which is used displays the text the same as it is typed in the HTML document?

Page 12: M02 un04 p03

Lab Exercise

6. Write a HTML code to display the output as shown in the following figure using the font and pre tag. Save the file as States.HTML under the folder in your name in C:.

Page 13: M02 un04 p03

Activity 2.4.3

1. Create a web page that explains the <SUP>, <SUB>, <CENTER> and <STRIKE> tags as shown in Figure.

2. Save the HTML file as Activity3.HTML in C:\HTML\Unit4\Activity folder.

Page 14: M02 un04 p03

Activity 2.4.3 cont…

Page 15: M02 un04 p03

Summary

In this presentation, you learnt the following:• Superscript is the text that is displayed

slightly above the line of text.• Subscript is the text that is displayed slightly

below the line of text.• The <CENTER> tag is used to display the

text in the centre of a row.

Page 16: M02 un04 p03

Summary

• The text within the <PRE> tag will be displayed in the browser window in the same format as it is presented in the HTML document.

• A text can be stroked out using the <STRIKE> tag.

Page 17: M02 un04 p03

Assignment

1. Name the tag is used to strike out a text?

2. Write the use of <Centre> tag.