11th Std-computer Applications Vol-ii Em - Www.tn11th.in 6g233q

  • ed by: archana
  • 0
  • 0
  • August 2021
  • PDF

This document was ed by and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this report form. Report l4457


Overview 6h3y3j

& View 11th Std-computer Applications Vol-ii Em - Www.tn11th.in as PDF for free.

More details h6z72

  • Words: 43,042
  • Pages: 216
tags. All HTML documents should follow this general format



My First Web Page 1e4hb



This is my First Web Page

HTML tags are generally have an opening and closing tag surrounding the text they affect. Opening tag turn-on a feature such as heading, bold, center etc., and closing tag turn-off its features. Opening and closing tags are the same name, but closing tag name preceded by a slash ( / ). For example, is an opening tag, is a closing tab. Every web document has two sections viz. Heading Section and Body Section. The heading section is used to show the title of a webpage in title bar or tab heading in browser. The head section should begins with tag and end with tag. The tag is used to specify the title of the webpage. The body section is used to display the main content on the browser window. The body section should defined within <body 1g2eb and </body> tags. Whatever the text you specify between these tags will display on the browser window. (Refer Figure 10.1)<br /> <br /> 29<br /> <br /> Chapter 10 Pages 28-53.indd 29<br /> <br /> 02/08/18 2:42 PM<br /> <br /> www.tn11th.in Head Section<br /> <br /> Body Section<br /> <br /> Figure 10.1 – Internet Explorer with my first web page 10.2.2. Structural Tags of HTML: <html>, <head>, <title> and <body> these four tags are known as structural tags. These tags are basic essential elements to construct a web page. Table: 10.1 Opening Tag Closing Tag <html><br /> <br /> </html><br /> <br /> <head><br /> <br /> </head><br /> <br /> <title><br /> <br />





Description The tag identified the document as an HTML document. All HTML documents should begins with and end with . The tag contains information about the document, including its title, scripts used, style definition and document descriptions. The tag contains the title of the document. The title specified between opening and closing tags appears in the title bar / page tab of the browser. <title 536io tag should be placed within <head> tag. The <body> tag encloses all the tags, attributes and information to be displayed in the web page. <body> tag should be entered below the </head> tag.<br /> <br /> 10.2.3. HTML Writing Tools To get started writing HTML, there is no need of web server, web hosting or even internet connection. You can write, test and link web pages without a network. To create and 30<br /> <br /> Chapter 10 Pages 28-53.indd 30<br /> <br /> 02/08/18 2:42 PM<br /> <br /> www.tn11th.in testing a HTML document i.e. web page need an application (text editor) to write HTML code and a browser to view them. Using a simple text editor (Notepad for Windows or getit for Linux) is a good way to learn HTML coding. 10.2.3.1 Creating a Webpage Step 1: Open a text editor <br /> <br /> Windows7 : Start → All Programs →Accessories → Notepad<br /> <br /> <br /> <br /> Linux : Applications → Accessories → Text Editor<br /> <br /> Step 2: In the appearing Note pad / Text Editor, type the HTML document. (Refer Figure 10.2)<br /> <br /> Figure 10.2 – Notepad with HTML code Step 3: Save the file as HTML • Click File → Save (or) Press Ctrl + S • Save as dialog box appears as shown in the Figure 10.3 • In “File Name” text box, type a file name with .htm or .html extension. • Select “All Files” from “Save as type” list box. • Click “Save” button. 31<br /> <br /> Chapter 10 Pages 28-53.indd 31<br /> <br /> 02/08/18 2:42 PM<br /> <br /> www.tn11th.in Save in Location<br /> <br /> File name with .htm or. html<br /> <br /> Select "All Files"<br /> <br /> Figure 10.3 Save As dialog box 10.2.3.2. Viewing Webpage in a Browser: Step 1: Open a Browser (Internet Explorer / Mozilla Firefox or any) Step 2: Click File → Open File (or) Press Ctrl + O • If menu bar is not visible in your browser refer Figure 10.4 Right - click here<br /> <br /> From the popup menu click Menu bar option<br /> <br /> Now, a menu bar appears<br /> <br /> 32<br /> <br /> Chapter 10 Pages 28-53.indd 32<br /> <br /> 02/08/18 2:42 PM<br /> <br /> www.tn11th.in Right - click any where in title bar<br /> <br /> From the popup menu click Menu bar option<br /> <br /> Now, a menu bar appears<br /> <br /> Figure 10.4 Mozilla Firefox and Internet Explorer with Menu bar Step 3: From the “Open” dialog box, browse the folder in which the HTML document is saved. Choose the File name and click “Open” button. (Refer Figure 10.5) File Location<br /> <br /> Available HTML Files<br /> <br /> Refer File type<br /> <br /> Click "Open"<br /> <br /> Figure 10.5 Open Dialog box to open an HTML document 33<br /> <br /> Chapter 10 Pages 28-53.indd 33<br /> <br /> 02/08/18 2:42 PM<br /> <br /> www.tn11th.in Now, your web page is displayed in the browser. (Refer Figure 10.6)<br /> <br /> Figure 10.6 Internet Explorers with “My First Web Page” 10.2.3.3 Viewing Source file Source file is an HTML document, what you actually type in text editor (Notepad or getit). You can view your original source file in the browser. The following steps are to be followed to view a source file. • Right click on the browser • Select View Page Source (Firefox and Chrome) / View Source (Internet Explorer) or Press Ctrl + U (all browser) • Source file will be displayed. • In Internet Explorer, View → Source is also used to open source file. that, you cannot edit the source file opened using the methods you learnt above. 10.2.3.4 Edit and Reload the source file Source file can be edit only through the text editor. So, to edit the source file, open the source file with a text editor. When you edit a source file, no need to close browser in which displaying the HTML document. The following steps are to be followed to open a source file. • Go to the folder in which your source files are located. • According to you default browser, your source file icon is displayed. (Refer Figure 10.7) 34<br /> <br /> Chapter 10 Pages 28-53.indd 34<br /> <br /> 02/08/18 2:42 PM<br /> <br /> www.tn11th.in Internet Explorer<br /> <br /> Mozilla Firefox<br /> <br /> Google Chorme<br /> <br /> Figure 10.7 Source files in different browsers • Right click on the source file that you want to edit • From the pop-up menu, select Open With → Notepad • Source file will be opened in text editor • Make the changes and save the file using File → Save or Ctrl + S. Reload / Refresh the changes: • After modify and save the source file, minimize your source file. • Go to the browser. • Click Refresh (Internet Explorer) / Reload Current Page (Firefox) / Reload this page (Chrome) icons on the address bar. • Press Ctrl + R or F5 will be used to refresh / reload the modifications.<br /> <br /> 10.3 HTML Attributes Attributes are special words used inside a tag to specify additional information to a tag. Attributes should be placed within the opening tag. Most of the tags specialized attributes and there are also a few global elements that can be used with any tag. Global elements are common to all HTML elements; they can be used on all elements. 35<br /> <br /> Chapter 10 Pages 28-53.indd 35<br /> <br /> 02/08/18 2:42 PM<br /> <br /> www.tn11th.in 10.3.1 Attributes for Structural Tags 1. Attributes of <html> tag The <html> tag is used to specify the beginning and closing of an HTML document. This tag does not have any effect on appearance of document. This is only used to make browsers and other programs, known that this is an HTML document. <html> tag has two attributes viz. dir and lang to specify the text direction and language setting respectively. attribute Value to be set to attribute Description dir attribute specifies the direction of the text to be aligned within the entire document. It is global ltr (align left-to-right) dir attribute. rtl (align right-to-left) • ltr is the default value • rtl is used for Arabian languages. lang attribute specify the language used with in Predefined language code the document. Predefined language code will be English – en lang used for this purpose. Tamil – ta Malayalam – ml; Kannada – kn; Hindi – hi; Telugu – te French – fr; German – de;<br /> <br /> Entire document aligned right<br /> <br /> Figure 10.8 Webpage with HTML Attributes 36<br /> <br /> Chapter 10 Pages 28-53.indd 36<br /> <br /> 02/08/18 2:42 PM<br /> <br /> www.tn11th.in 2. Attributes of <body> tag The <body> tag defines the document’s body. The contents of an HTML page reside within the <body> tag. <body> tag contains several attributes. (i) Background Colour: bgcolor = color ` By default all the browsers display the text on white background. However, the background color of the browser can be changed by using bgcolor tag. The tag to change background colour: <br /> <br /> <body bgcolor = color_name/color_code> Illustration 10.1 – HTML code to change background colour of a browser <html> <head> <br /> <br /> <title> Background Colour change







This is my browser with different colour



D:\CS_TestBook_Final\HTML\

File

Edit View Favorites

Tools

Background Colour change Help

This is my browser with different colour

File

Edit Format

bgcolor - Notepad

View Help

Background Colour change </ title 42055 </head> <body bgcolor = yellow> This is my browser with different colour </body> The Colour of the </html> browser turns in yellow<br /> <br /> Figure 10.9 Internet Explorer with Yellow background 37<br /> <br /> Chapter 10 Pages 28-53.indd 37<br /> <br /> 02/08/18 2:42 PM<br /> <br /> www.tn11th.in In the above HTML code, colour name has been used to change the background colour of the browser’s body section. Generally colors in HTML are represented as six digit hexadecimal values. Colour name can be used for only few colors. But, color code (hexadecimal value) will be more flexible to handle colors.<br /> <br /> <br /> <br /> The six digit hexadecimal value is the combinations of three, two digit number sequence represent a color. First two digits represent Red, next two digits for Green and last two digits for Blue (RGB) in the range of 00 – FF. For example, 000000 is black and FFFFFF is white. FF0000 is bright red. You can try out different combinations of these values to get variety of colors. You can use some basic color names or color code to handle colors in HTML elements. Modern browsers nearly 140 colors. Color code should be prefixed with #. The following table shows some basic colors with their hexadecimal code. Table 10.2 – Some basic Color names with code Color Name Hexadecimal value Red #FF0000 Blue #0000FF<br /> <br /> Color Name Olive<br /> <br /> Hexadecimal value #808000<br /> <br /> White<br /> <br /> #FFFFFF<br /> <br /> Green<br /> <br /> #008000<br /> <br /> Black<br /> <br /> #000000<br /> <br /> Yellow<br /> <br /> #FFFF00 #00FF00 #800080 #C0C0C0<br /> <br /> Maroon Grey Aqua Brown<br /> <br /> #800000 #808080 #00FFFF #A52A2A<br /> <br /> Lime Purple Silver<br /> <br /> To know the complete color code visit: https://www.w3schools.com/tags/ref_colornames.asp The above illustration 10.1 can be re-written as follows to get the result <html> <head> <br /> <br /> <title> Background Colour change







This is my browser with different colour



38

Chapter 10 Pages 28-53.indd 38

02/08/18 2:42 PM

www.tn11th.in (ii) Body text Colour: text = color The default text colour of body section is “black”, it is often called as automatic color. text attribute within body tag is used to change the text colour. The tag to change body text colour:

Illustration 10.2 – HTML code to change background and text color of a browser’s body

Background Colour change 4b4y6p







This is my browser with different colour



To the above code, text will be displayed in Red color on yellow background. You can also use colour code instead of colour name. (iii) Background image: background=image An image or picture can be applied as background to a webpage. When you insert an image as background, the text will be displayed on top of the image. Background images can be a texture or bitmap or even a photo. When you insert a small image, the browser takes the image and repeats it across and down to fill browser window. Inserting animated images (GIF images) creates more interesting. The tag to apply an image as background:



39

Chapter 10 Pages 28-53.indd 39

02/08/18 2:42 PM

www.tn11th.in

Illustration 10.3 – HTML code to apply an image as background

Image as background 67416w







This is my browser with an image as background



Inserting an image as background

Figure 10.10 Internet Explorer with an image as background While including an image as background, the image file name is not required to be in double quotes. The code can also produce the same result. If your image file name is long or split as two more words or along with path, should be specify within double quotes. that, if the image file and HTML source are located in different locations i.e. in different folder or drive, file path should be clearly specified along with image file name. In the above case, image file and HTML source file both are located within the same folder. So, path name is not mentioned. For example, If the image file is somewhere in a folder (say Images folder in E: drive), you must specify its full path within double quotes as given below.

40

Chapter 10 Pages 28-53.indd 40

02/08/18 2:42 PM

www.tn11th.in (iv) Setting Margins: margin = value The margin refers the blank area from left or top edge of the browser window. Generally there is no default margin setting in any browser. If you want to leave some space as margin to left or top; leftmargin or topmargin attributes will be used respectively. The tag to specify the left and top margin:





The Value is referred as pixels (72 pixels to an inch) Illustration 10.4 – HTML code to set left and top margins

Setting Margins 94g27







This is my Web page with top and left margin



The statement will intent the body text 50 pixels away from the left as well as from top edge of the browser. The output will be as in Figure 10.11

50 Pixels from left

50 Pixels from top

Figure 10.11 – Internet Explorer with left and top Margin 41

Chapter 10 Pages 28-53.indd 41

02/08/18 2:42 PM

www.tn11th.in Illustration 10.5 – Create a web page (HTML document) to the following specification. • Title: My First Web Page • Text to be display: Welcome to Computer Applications • Background color: Lime • Body text color: Blue • Margin: from left and top 1 inch

My First Web Page 1e4hb







Welcome to Computer Applications



that, when you use more than one attribute within an HTML element (Tag) space is used as separator.

10.4 Headings Headings are used to include titles to sections of a web page. HTML has six levels of headings viz.

to 6p3960

. The number with h indicates the level of heading. Header tags are display the body text as bolder and larger in size according to its level. The syntax of heading tags: Heading text 42 Chapter 10 Pages 28-53.indd 42 02/08/18 2:42 PM www.tn11th.in Illustration 10.6 – HTML code with Headings Heading 646h3t

Welcome to Computer Application 62243w





Welcome to Computer Application 62243w





Welcome to Computer Application 62243w





Welcome to Computer Application 62243w





Welcome to Computer Application 62243w




Welcome to Computer Application 62243w




11482j

11482j

11482j

11482j

11482j
Figure10.12 – Different levels of Headings 10.4.1 Attribute of Headings tag Align is an attribute to set right, center and justify alignment to headings. Left if the default alignment, so that it is not ed in latest version of HTML. Justify alignment is not ed by older browsers. The tag is to specify the alignment to headings: 43 Chapter 10 Pages 28-53.indd 43 02/08/18 2:42 PM www.tn11th.in Where # is the level number, value may be Right, Center or Justify. Justify alignment only used for paragraphs. The meaning of alignment is similar what you learnt from Word processor. Illustration 10.7 – HTML code with Heading and align attributes Heading Welcome to Computer Application Welcome to Computer Application Output will be as follows Welcome to Computer Application Welcome to Computer Application Figure 10.13 Heading align attribute 10.5 Line Breaks and Paragraphs Browser applications are having some special rules for displaying text. They do not recognize returns, tabs or even more than one space between words. If you create an HTML document with multiple lines of text, browser will display it as a single line. (Refer Figure 10.14) 44 Chapter 10 Pages 28-53.indd 44 02/08/18 2:42 PM www.tn11th.in Browser display multiple lines as a single statement. Because, the browser does not recongnize returns } Multiple lines Figure 10.14 Multiline statement displayed as Single line The tag is used for line break. The is an empty tag, does not have close tag and attribute. It should be placed at the end of a line. (Refer Figure 10.15) } Multiple lines with tag Multiple lines without tag } } Figure 10.15 Usage of tag 45 Chapter 10 Pages 28-53.indd 45 02/08/18 2:42 PM www.tn11th.in In HTML, paragraphs are created using the tag. The content what you type between and is identified as a paragraph and display as a paragraph by the browser. Because, the browser does not recognize returns (Pressing “Enter” Key). that in word processors, pressing “Enter” key is identifying a paragraph. Illustration 10.8 HTML code to create a paragraph Paragraph Business Business may be defined as any activity in which a man is very much interested and these activities bring him profit, money, prestige and power. In economic sense, the term business means works, efforts and acts of people, which are connected with the production of wealth and activities, which are directed with the object of making profit. Production and distribution of goods to consumers for a profit constitute business. In the above illustration, the contents specified between and considered as paragraph. Each paragraph displayed separately (Refer Figure 10.16). Figure 10.16 Browser with Paragraphs 46 Chapter 10 Pages 28-53.indd 46 02/08/18 2:42 PM www.tn11th.in Changing Paragraph alignment You know already that the types of paragraph alignments in Word processor. In HTML documents more are four paragraph alignments viz. Left, Right, Center and Justify. The text that you type between and is by default aligned to left. To change the alignment of a paragraph align attribute can be used with tag. The tag to specify the alignment to paragraphs: Where alignment can either be Right, Center or Justify. that, left is the default alignment. If you re-write the code in Illustration it will produce the following output. (Refer Figure 10.17) Right aligned Paragraph Justify aligned Paragraph Center aligned Paragraph So ur ce Fil e Figure 10.17 Paragraph with align attribute that, the keyboard shortcut to change paragraph alignment in word processor is not working in HTML. 10.6 Comments Comments are used to describe the page or provide some kind of indication of the status of the page. The tag is used to create comments. In HTML, the text what you type within this tag is considered as comments and it is ignored by the browser. Comments never show up onscreen. Comments can be placed anywhere in HTML document. The general form of comments: 47 Chapter 10 Pages 28-53.indd 47 02/08/18 2:42 PM www.tn11th.in 10.7 Container and Empty Elements The HTML elements (Tags) can be classified as two types – (1) Container elements (2) Empty elements. Container Elements: • The tags which are required opening and closing is known as container elements or tags. For example: , , , <p> etc., Empty Elements: • The tags which are required only opening tag is known as empty elements or tags. For example: <br> Points to : • HTML (Hyper Text Markup Language) is a special markup language used to create web pages • HTML is not a word processing tool or a programming language. • HTML is made up of tags and its attributes. • Tags are known as elements of HTML. • Attribute is special word used inside tag to specify additional information to the tag such as color, alignment etc. • Every web document has two sections viz. Heading Section and Body Section. • <html>, <head>, <title> and <body> these four tags are known as structural tags • List of HTML tags from Section-I Table 10.3 Opening Closing Tag Tag <html><br /> <br /> <head><br /> <br /> <title><br /> <br /> Type<br /> <br /> Function<br /> <br /> Attributes<br /> <br /> Contains<br /> <br /> Used inside<br /> <br /> </html> Container<br /> <br /> Delimits a complete HTML document<br /> <br /> Dir, Lang<br /> <br /> <head>, <body><br /> <br /> </head> Container<br /> <br /> Defines the function header<br /> <br /> --<br /> <br /> <title><br /> <br /> <html><br /> <br /> Defines the document title -- Text Container 48 Chapter 10 Pages 28-53.indd 48 02/08/18 2:42 PM www.tn11th.in Container Defines the document body All tags that Background, controls the Bgcolor, Text, appearance of Leftmargin, body of the web Topmargin page 6134i
, < h 1 > , Defines one ,

…. Container of six levels of …… headings h6>

Align

Text



Align

Text



---

Text





Defines a Container paragraph of text




--

Empty

Insert a line break

---

Workshop - 1 Type the following code in a text editor, save it as an html file and open in a browser. Observe and study their functions by viewing them in your browser. Then, make the required changes and look what happens.

Thai Pongal

Pongal is a harvest festival dedicated to the Sun. It is a fourday festival which according to the Tamil calendar is usually celebrated from 14 January to 17 January.

Thai Pongal is one of the most important festivals celebrated by Tamil people in Tamil Nadu, Puducherry and the country of Sri Lanka, as well as Tamils worldwide, including those in Malaysia, Mauritius, South Africa, the United States, Singapore, Canada, Myanmar (Burma) and the UK.

Thai Pongal corresponds to Makara Sankranthi, the harvest festival celebrated throughout India.



Carry over the following changes: (a)

Add a suitable title

(b)

Center the heading

(c)

Change the different alignment setting for each paragraph 49

Chapter 10 Pages 28-53.indd 49

02/08/18 2:42 PM

www.tn11th.in Workshop - 2 Type the following code in a text editor, save it as an html file and open in a browser. Observe and study their functions by viewing them in your browser. Then, make the required changes and look what happens. My School 385k31 My School: Chennai Girls Higher Secondary School, Rotler Street, Choolai, Chennai 600 112 My Subjects: Tamil, English, Computer Application, Commerce, ancy, Economics My Computer Teacher: Mr. K. Kannan, M.Com., M.CA., B.Ed.,

Re-Write the above HTML code to get the following output:

50

Chapter 10 Pages 28-53.indd 50

02/08/18 2:42 PM

www.tn11th.in

Evaluation Part – I Choose the Correct Answer: 1. HTML is acronym for (a) Hyper Transfer Markup Language (c) Hyper Transfer Makeup Language

(b) Hyper Text Markup Language (d) Hyper Text Makeup Language

2. The coded HTML keywords that indicates how web browser should format and display the content is called……. (a) Tags (b) Attributes (c) Headings (d) Body 3. Which of the following is a special word used inside tag to specify additional information to the tag? (a) Tags (b) Attributes (c) Headings (d) Body 4.

HTML tags should be specified within: (a) [ ] (b) { }

5.

An HTML document is bounded within a pair of ….. tags (a) ……. (b) ……. pv4q (c) ……. (d) ……

(c) ( )

(d) < >

6. Which of the following symbol is used to define a closing tag? (a) < > (b) % (c) / (d) \ 7.

Which section of the browser window displays the main contents? (a) Head (b) Body (c) Title (d) Heading

8.

Which of the following tag is a structural tag? (a) (b)

(c)


9.

In HTML, colours are represented as (a) Binary values (b) Octal values

(d)



(c) Decimal values (d) Hexadecimal values

10. Which of the following symbol is used to prefix with hexadecimal value representing colour in HTML? (a) % (b) # (c) @ (d) & 11.

Which of the following attribute is used to change text colour within body tag? (a) bgcolor (c) background (c) text (d) color

12. Within body section, which of the following attribute is used to set top margin? (a) margin (b) top (c) topmargin (d) leftmargin 51

Chapter 10 Pages 28-53.indd 51

02/08/18 2:42 PM

www.tn11th.in 13. How many levels of heading tags available in HTML? (a) 6 (b) 4 (c) 8 (d) 3 14.

The tag used to insert a line break: (a)

(b)


15.

The tag used to define a paragraph in HTML: (a) <para> (b)

(c)

(c)

(d)

(d)


Part – II Answer to the following questions (2 Marks): 1 Sandhiya is creating a webpage. She is entering HTML code on her computer. In between, she keeps pressing “Refersh” / “Reload” button on her browser. What is the purpose? 2. Explain with the help of an example the difference between container and empty elements of HTML. 3.

What is the wrong in the following coding?

<my web page>

Welcome to my web page </head 5613u 4.

How do you define comments in HTML?

5.

How do you include an image as your web page background? Part – III

Answer to the following questions (3 Marks): 1.

Explain the attributes available with tag.

2.

What are the attributes available in tags?

3.

How do you view the source file?

4.

How do you save a file as HTML file?

52

Chapter 10 Pages 28-53.indd 52

02/08/18 2:42 PM

www.tn11th.in

GLOSSARY HTML

– Hyper Text Markup Language used to create web pages.

Tag

– A coded HTML command. It is also called as element.

Attribute

– Special word, carrying special meaning used inside on HTML tag.

Heading Section

– Refers title bar of a browser.

Body Section

– Refers main client area of a browser.

Browser

– An application to view web pages or web sites.

Web Page

– An Online page contains hypertext.

Hypertext

– Text which contains links to other texts. An application used to type and modifies text contents, but it is not a – word processor.

Text Editor Word Processor

– An application used to create and manipulate text documents.

Notepad

– A default text editor available with Windows.

Getit

– A default text editor available with Linux.

Windows

– Familiar GUI Operating system developed by Microsoft.

Linux

– Familiar Open Source operating system.

Internet Explorer – A browser available with Windows. A default browser available with Linux. Open Source Third party browser can be installed in windows.

Mozilla Firefox



Chrome

– A familiar web browser developed by Google.

References: 1. Mastering HTML, CSS & JavaScript Web Publishing – Laura Lemay, Rafe Colburn, Jennifer Kyrnin – BPB Publications. 2. Informatics Practices, A text book for CBSE class XII – Sumita Arora – Dhanpat Rai & Co. 3. Computer Application (Commerce) – Text book of XII – Department of Education – SCERT, Kerala. 4. https://www.w3schools.com/html/default.asp

53

Chapter 10 Pages 28-53.indd 53

02/08/18 2:42 PM

www.tn11th.in

Unit III

Web Page Development using HTML and CSS

CHAPTER

11

HTML - Formatting text, Creating Tables, List and Links Learning Objectives: The students will learn the following: • How to formatting text contents of an HTML document with variety of tags and attributes. • How to create and manipulate tables in HTML. • How to create different types of List. • What is Link and how to create internal and external links.

11 Text Formatting Tags of HTML In the previous section you learn how to create a web page with basic elements. In this section, you are going to learn about how to format the text such making bold, italic, underline, changing font style, font size, font color and more. Formatting text is very important as well as interesting task in creating web pages. Formatting is purely based on your imagination and creativity.

11.1 Text Formatting Tags of HTML

In the previous chapter you learnt how to create a web page with basic elements. In this section, you are going to learn about how to format the text such as making bold, italic, underline, changing font style, font size, font color and more. Formatting text is very important as well as interesting task in creating web pages. Formatting is purely based on your imagination and creativity. 11.1.1 Bold, Italics, Underline

, , are the tags to make the text as bold, italic and underline. These are all container tags. You know well about container tags. All container tags required a closing tag. These tags are otherwise known as “Physical Style” tags.

54

Chapter 11 Pages 54-92.indd 54

02/08/18 2:44 PM

www.tn11th.in Table 11.1 Physical Style Tags Opening Tag Closing Tag

Description Text will be bold Text will be italics Text will be Underlined Text will be old type writer style i.e. fixed width font

Illustration 11.1 Text Formatting Text Formatting 56634x

Kancheepuram

Kanchipuram is part of Tondaimandalam
Kanchipuram is 72 km away from Chennai
It is the istrative headquarters of Kancheepuram District.
Kanchipuram is well-connected by road and rail.

Chennai International Airport is the nearest domestic and international airport to the town, which is located at Tirusulam in Kanchipuram district.

Output will be:

55

Chapter 11 Pages 54-92.indd 55

02/08/18 2:44 PM

www.tn11th.in 11.1.2 <strong> and <em> tags In addition to bold and italic tags i.e. and , HTML provides <strong>, <em> tags to make the text as bold and italics. These tags are container tags. <strong> Important text The <strong> tag is a phrase tag. It is used to define important text. This tag displays the text as bold. <em> - Emphasized text The <em> tag is used to emphasize the text. That means, when you use this tag, the text will be in italics. Visually these two tags display the contents as very similar as and respectively. But, technically the meaning of <strong> and <em> is “Important” not just bold and italics. Illustration 11.2 Usage of <strong> and <em> tags

Additional Text Formatting Tags 5d2j42

<strong> Welcome to Tamilnadu
<em> Welcome to Tamilnadu


Output will be:

56

Chapter 11 Pages 54-92.indd 56

02/08/18 2:44 PM

www.tn11th.in 11.1.3 and <small> tags The tag is used to define the text bigger in size than the normal size. It is often used to call attention a text. The <small> tag is used to define the text smaller than the current size. These two tags are container tags. Illustration 11.3 Usage of and <small> Small and Big tags 152d42

Govenment of Tamilnadu




Madurai Corporation welcomes you




<small> Thank you! Visit again



Output will be:

Normal Text

Small

Big

11.1.4 Highlighting text Highlighting is an important formatting feature is used to call attention to the reader. The <mark> tag is used to highlight the text in HTML. This is also a container tag. Whatever 57

Chapter 11 Pages 54-92.indd 57

02/08/18 2:44 PM

www.tn11th.in the text given between <mark> and will be displayed as highlighting with default color (mostly yellow). Illustration 11.4 Usage of <mark> Highlighting text 3i56u

A Computer is an <mark> electronic device



Output will be:

11.1.5 Subscript and Superscript A Subscript is a way to display a character or a number below the normal line of type. For example: The scientific notation for water is H2O. It should be written as H2O. Here, 2 is appearing below the normal line. This is called subscript. A Superscript is also a way to show a character or a number above the normal line of type. For example: The familiar algebra equation “a plus b the whole square” should be written as (a+b)2. Here, the square value 2 is appearing above the normal line. This is called superscript. Usually, the subscript and the superscript character or number is smaller than the rest of the text. In HTML, the <sub> and <sup> tags are used to create subscript and superscripts respectively. As like as other formatting tags, this is also a container tag. 58

Chapter 11 Pages 54-92.indd 58

02/08/18 2:44 PM

www.tn11th.in The text or number given between <sub> and will be displayed as subscript. Same as subscript, the text or number given between <sup> and will be displayed as superscript. Illustration: 11.5 Usage of <sub> and <sup> Subscript and Superscript d4x3b

The scientific notation of Water is H<sub>2O


(a+b)<sup>2 = a<sup>2 + 2ab + b<sup>2


The output will be:

The Scientific notation of Water is H<Sub>20

(a+b)<Sup>2=a<sup>+2ab+b<sup>2 11.1.6 Inserting and Deleting The text what you see on browser cannot delete or insert. But you can show a text as deleted or inserted. <del> and tags are used to markup a segment of text as deleted or inserted respectively. These two tags are container tags. The text what you specify between <del> and will be displayed as strike through. The text you specify between and will be shown as underlined. 59

Chapter 11 Pages 54-92.indd 59

02/08/18 2:44 PM

www.tn11th.in

Illustration: 11.6 Usage of <del> and Inserting and Deleting text 5j2t16

I am coming from <del> Madras Chennai



The output will be:

11.1.7 Strike through: To display a text as wrong text, the <s> tag can be used to show the text as strike through style. The <s> and <del> tags are display the text in similar way. This is also a container tag. The text you specify between <s> and will be display in strike through style. 11.1.8 Comparison of tags: A few tags do the same things you have learned so far. For example, and <strong>, and <em>, and and so on. These tags may be shows the same output, but the usage of tags are varying. The following table shows the usage of this kind of tags. Table: 11.2 Tag

Usage

To show the text in bold

To show the text as italics

Tag

Usage To show important <strong> text <em> To Call attention

Final Output Bold Italics

To show the text as underlined

To insert a text

Underline

<s>

To replaced or deleted text

Strike through

To show the wrong text

<del> 60

Chapter 11 Pages 54-92.indd 60

02/08/18 2:44 PM

www.tn11th.in While writing HTML document, you should use the appropriate tags according to its usage. If you want show a text as underlined use instead of . 11.1.9 The Center Tag Paragraphs can be centered with Align attribute with

tag. But for non-paragraph text contents can be centered with

tag. The
tag is used to centralize a segment of text. It is a container tag. That means, what you type between
and
will be displayed in the center of the browser. Illustration 11.7 Center the text

Center the text 4n3zi



Thiruvallur





Thiruvallur was originally known as Thiruvallur which specifies the sleeping position of the holy lord "Balaji" , in the



Veeraragava swamy temple of Thiruvallur.


Output will be

11.2 Changing font style, size and color The tag is used to change the style, size and color of text. It is also a container tag. It is generally used for changing the appearance of a short segment of text. Before using 61

Chapter 11 Pages 54-92.indd 61

02/08/18 2:44 PM

www.tn11th.in , you should have the knowledge about fonts. A font is a named set of certain style of character and number. Each font looks different from other fonts. Generally some fonts are used for specific purpose. For example, Times New Roman is a style of font usually used for preparing office documents. Arial is another font style which is used for publishing work. Variety of fonts available in internet at free of cost. Generally, a browser shows the contents as default system font setting. Every system has different font setting with another system. The general form of tag with attributes:





Text to be displayed

• The face is an attribute to set different font style. The name of a font has multiple words it should be specified within double quote. • The size attribute is used to set size of the text. The size can have an absolute value from 1 to 7. These predefined sizes are known as virtual size. Each virtual size is successively 20% larger than the previous one. • The color attribute is used to set the color to the text. As you leant earlier color name or color code in hexadecimal may be used. Illustration 11.8 HTML code to change font properties Changing Font Properties isa Font Size 1
Font Size 2
Font Size 3
Font Size 4
Font Size 5
Font Size 6
Font Size 7


62

Chapter 11 Pages 54-92.indd 62

02/08/18 2:44 PM

www.tn11th.in The output will be:

Note: The tag is not ed by HTML5. Multiple fonts with face attribute: As you learnt already, the face attribute of font tag is used to change font style of a segment of text. In face attribute, you can assign more than one font-name at a time within double quotes with comma. For example, Welcome to HTML Browser first tries to find out whether the font-name in the list is ed or not. If the first font is not ed by the browser, then it displays the text in second font, otherwise it will display next one. If no font in the list is ed, then the browser display the in the default font. In the above code, consider the font names “Bookman old style1” and “Broadway1” are not ed by any browser. (Because, the names has been changed). So, the text “Welcome to HTML” will be displayed in “Forte” style. If your browser not ed “Forte” font, the text will be displayed in “Arial” font, otherwise the browser shows the text as in default font setting. In the case of Internet explorer, the “Times New Roman” is the default font to display the contents. 63

Chapter 11 Pages 54-92.indd 63

02/08/18 2:44 PM

www.tn11th.in 11.3 Section Break The
(Horizontal Rules) tag, which is known as “Thematic Breaks” separate sections of an HTML document visually. It produces a horizontal line spread across the width of the browser. This is an empty tag, which means the tag has no closing tag. Illustration 11.9 An HTML code to demonstrate Horizontal rules tag -
Horizontal Tag f6914

Tamil Language

Tamil is a Dravidian language predominantly spoken by the Tamil people of
India, Sri Lanka, Singapore, Malaysia, Mauritius and South Africa
Tamil is an official language of India (Tamilnadu and Puducherry), Sri Lanka and Singapore.

64

Chapter 11 Pages 54-92.indd 64

02/08/18 2:44 PM

www.tn11th.in The output will be:

Attributes of
tag The
tag having four attributes viz. size, width, noshade and color. These attributes are used to set size, width, 3D appearance and color to the horizontal line respectively. The general syntax of
tag with attributes:




Size: Thickness of the horizontal line can be changed with size attribute. The size is given in of pixels. A pixel is one of the tiny dots that make up the display on computer. Generally, 72 pixels equal to an inch. Pixel is usually referred as points. For example: The code
display a horizontal line with 1 inch thickness. The default size is 3 pixels. Width: The width attribute specifies the horizontal width of the rule line. The default rule is drawn across the full width of the browser. The value of the width attribute may be the exact width of the rule in pixel or a certain percentage. Usually, the value of the width is specified as percentage. 100% is the default width. For example:


display an half of a horizontal rule line on the browser window. 65

Chapter 11 Pages 54-92.indd 65

02/08/18 2:44 PM

www.tn11th.in Noshade: The default view of a horizontal rule line is 3D. So, no need to specify the term “noshade” as an attribute with
tag. If you specify the attribute “noshade” turn off 3D view, turns on 2D view. Noshade is a Boolean type attribute. Color: The horizontal line is displayed in gray color by default. The color attribute is used to change is default color to desired color. As you leant already, the value of color either is a color name or color code. Note: All attributes of
tag is not ed by HTML5 Illustration 11.10: An HTML code to demonstrate Horizontal rules with Attributes.

Horizontal Line Attributes 2n372x



Rule with size 72pixels








Rule with size 36pixels, 50% width








Rule with size 18pixels, 30% width, in 2D








Rule with size 9pixels, 50% width, 2D, in Green color








66

Chapter 11 Pages 54-92.indd 66

02/08/18 2:44 PM

www.tn11th.in The output will be

11.4 Tables in HTML Table is grid of rows and columns. , what you learnt about tables in OpenOffice Writer. Creating a table in HTML is not as easy as created in OpenOffice writer. The tables were officially introduced with HTML 3.2. Tables are useful for the general display of tabular data. Representing table in HTML is heavy on tags. 11.4.1 Tags to create table elements There are five core tags are used to create a table in HTML. They are, •









Creating Table 63285y tag is used to create a table. • tag defines table rows • , and tags are also used to define and control whole sections of table. All the above tags are container tags. 11.4.2 Creating Table With the following illustration, you can learn how to create a table in HTML. 67 Chapter 11 Pages 54-92.indd 67 02/08/18 2:44 PM www.tn11th.in Illustration 11.11: An HTML code to Table tags
tag defined table columns • tag is used to specify the data in a cell •
tag defines title for the table • Apart from these five core tags,
Books and Authors
Book Author Publisher
Foxpro 2.5 R.K. Taxali BPB Publications
Visual Basic .NET Jeffrey R. Shapiro Tata McGraw Hill
Core Java Vol 1 Horstmann Cornell Pearson


In the above HTML code, the






























































































































































































    and
    tags.

    6.

    Write HTML code to produce the following table: A

    B C Part – IV

    Answer to the following questions (5 Marks): 1.

    Write an HTML code the show the following text: MODERN ATOMIC THEORY The findings of modern atomic theory are given as follows: • An atom is the smallest particle which takes part in chemical reaction. • An atom is considered to be a divisible particle. • The atoms of the same element may not be similar in all respects. eg: Isotopes (17Cl35, 17Cl37) • The atoms of different elements may be similar in some respects. eg. Isobars (18Ar40, 20Ca40)

    2.

    Explain the attributes used with
tag creates a table structure with border. The code display the text specified between blocks. First block of creates a table row with three column headings with the help of blocks display the contents what you specify within tags: 1. Align Used to specify the horizontal alignment of content within a cell. Left is the default alignment. Possible values are Right and Center. 2. VAlign Used to specify the vertical alignment of the contents within a cell. Bottom is the default alignment. Possible values are Top and Middle 3. Width Used to specify the width of a cell in of pixels or percentage. 4. BGcolor and Background Bgcolor attribute is used to apply a particular colour to the background of a cell. Background attribute is used to apply an image or picture as background of a cell. 5. Rowspan and Colspan Rowspan attribute is used to merge two or more cells in a row as a single cell. Colspan attribute is used to merge to two or more cells in a column as a single cell. Illustration 11.13: An HTML code to demonstrate the attributes of 6. Match the following: (a) tfoot - (1) Order list (b) start - (2) Hyperlink (c) href - (3) Highlight (d) mark - (4) Table (a) (b) (c) (A) 4 1 2 3 (B) 1 4 3 2 (C) 4 3 2 1 (D) 1 2 4 3 (C) 3 (D) 2 (d) 7. Definition list has how many parts? (A) 5 (B) 4 89 Chapter 11 Pages 54-92.indd 89 02/08/18 2:44 PM www.tn11th.in 8. A list block can be defined inside another list is: (A) Inner List (B) Nested List (C) Outer List (D) Listing List 9. Read the following statement and choose the correct statement(s): (I) Link in HTML is used to create hyperlinks to web content. (II) HREF is abbreviated as Hypertext Markup File (A) I is correct (B) II is correct (C) I and II is correct (D) Both are wrong 10. To create internal link, which of the following attribute should be used? (A) link (B) name (C) local (D) Inter Part – II Answer to the following questions (2 Marks): 1. Write a short note on (i) <strong> (ii) <em> 2. What is the use of <mark> tag? 3. Write the following equation as HTML notation: Pd = 25 – Q2 4. Write about any two attributes of font tag. 5. What is thematic break? 6. What is pixel? 7. What are the types of list in HTML? 8. How will you define numbered list? Part – III Answer to the following questions (3 Marks): 1. Write an HTML code to display the following text in exactly the same way as given below. I am studying Computer Science Application. 2. Briefly explain the attributes of tag. 3. What are the core tags used to create table in HTML? 4. Write an HTML code to provide hyperlink to https://www.w3schools.com 90 Chapter 11 Pages 54-92.indd 90 02/08/18 2:44 PM www.tn11th.in 5. Difference between
Books and Authors as title to the table. The above code contains four set of
tag. When you use tag, the column heading were aligned center and text becomes bold by default. Rest of the
tags. All the tags used with table were container tags. So, each and every tag should be closed with their closing tag. The following Figure is more useful to understand the same code given above.

68

Chapter 11 Pages 54-92.indd 68

02/08/18 2:44 PM

www.tn11th.in The output will be:

Row 2 Row 3 Row 4

Table Block

Row 1

Table heading























Column heading { { { { Row 2 - Data Row 3 - Data Row 4 - Data
Books and Authors
Book AuthorPublisher
Foxpro 2.5
R.K. Taxali BPB Publications
Visual Basic .NET
Jeffrey R. Shapiro Tata McGraw Hill Core Java Vol 1 Horstmann Cornell Pearson
















69 Chapter 11 Pages 54-92.indd 69 02/08/18 2:44 PM www.tn11th.in 11.4.3 Attributes of table The
Books and Authors
Foxpro 2.5 R.K. Taxali BPB Publications
Book Author Publisher




is a container tag. There are several attributes to improve the layout of the table. They are listed below: 1. Cellspacing It is used to set the space between cells in a table. The value should be in pixels 2. Cellpadding It is used to set the space between the contents of a cell and its border. the value should be in pixels. 3. Border: Border attribute with


















Table with Attribute 1ug33 tag is used to specify the thickness of the border lines around the table. The value of the border attribute should be a non zero value in pixels. If its value is zero, HTML displays the table without border. The default value is Zero in most the browsers. 4. Bordercolor: It is used to apply the colour to the border lines. 5. Align: It is used to set the position of the table within the browser window. Left is the default position. Right or center may be the value of align attribute. 6. BGcolor It is used to apply background colour to the table. 7. Height and Width These two attributes are used to specify the height and width of a table in of pixels or percentage. 70 Chapter 11 Pages 54-92.indd 70 02/08/18 2:44 PM www.tn11th.in Illustration 11.12: An HTML code to demonstrate the attributes of Table
Class Boys Girls
VI 150 165
VII 146 151
VIII 107 110


The output will be:

71

Chapter 11 Pages 54-92.indd 71

02/08/18 2:44 PM

www.tn11th.in Attributes of
, and
, and tags. Attributes of td 34qj tr and th tags









72 Chapter 11 Pages 54-92.indd 72 02/08/18 2:44 PM www.tn11th.in
Govt. Hr. Sec. School, Mullai Nagar, Thiruvallur
Boys and Girls Strength during 2016-17 and 2017-18
Class Group 2016 - 17 2017 - 18
Boys Girls Boys Girls
XI Science 75 82 65 96
Commerce 125 147 118 163
XII Science 86 97 71 106
Commerce 145 186 130 198


73

Chapter 11 Pages 54-92.indd 73

02/08/18 2:44 PM

www.tn11th.in The output will be:

Lists in HTML HTML s three types of lists viz. numbered, unnumbered and definition. These lists are called as Ordered List, Unordered List and Definition List respectively. 1. Numbered List / Ordered List Numbered list is created within the tag pair
    …..
tag. The tag
  • is used to present the list item in the list. Ordered list displays items in a numerical or alphabetical order. Both
      and
    1. tags are container tags. But the usual the practice, closing tag
    2. never be used. Illustration 11.14: An HTML code to demonstrate Numbered list Number List 1j336k
      1. Tamil
      2. Telugu
      3. English
      4. Computer Application
      5. Commerce
      6. ancy
      7. Economics


      74

      Chapter 11 Pages 54-92.indd 74

      02/08/18 2:44 PM

      www.tn11th.in The output will be:

      Attributes of Ordered List: There are two attributes can be used to customize ordered list, they are (1) Type - changing numbering style (2) Start - changing numbering order. Type – is used to change the number style. The default number style is standard Arabic numerals (1,2,3,…………). Table: 11.3 Type value Numbering style 1 Standard Arabic Numerals 1,2,3,4,………………. a Lowercase letters a, b, c, d, ………… A

      Uppercase letter A, B, C, D ………..

      i I

      Lowercase Roman numerals i, ii, iii, iv, v …………… Uppercase Roman numerals I, II, III, IV, V ………..

      Start – is used to specify the number of letter with which start the list. The default starting point is 1. The value of the start attribute should be a decimal number, regardless of the numbering style being used.

      75

      Chapter 11 Pages 54-92.indd 75

      02/08/18 2:44 PM

      www.tn11th.in

      Illustration 11.15: An HTML code to demonstrate attribute of OL tag Attribute of OL tag r5e3u



      1. Physics
      2. Chemistry
      3. Biology
      4. Botany
      5. Zoology



      The output will be:

      2. Un-numbered List / Unordered List Unordered lists are often referred as bulleted lists. Instead of numbers, each element in the list has prefixed with a special bullet symbol. Unordered list is surrounded within
      ………
    tags. As discussed above, each list element is defined by
  • tag. 76

    Chapter 11 Pages 54-92.indd 76

    02/08/18 2:44 PM

    www.tn11th.in

    Illustration 11.16: An HTML code to demonstrate Unordered list Unordered List 5o243q


    • Chennai G Hr. Sec. School, Rotler Street, Chennai 600 112.



    • Karnakata Sanga Hr. Sec. School, T. Nagar, Chennai 600 017.



    • S.M.B. Jain Hr. Sec. School, T. Nagar, Chennai 600 017.



    • Chennai G Hr. Sec. School, Nungambakkam, Chennai 600 034.



    • Chennai G Hr. Sec. School, Saidapet West, Chennai 600 015



    • Santhome Hr. Sec. School, Mylapore, Chennai 600 004.

    The output will be:

    Attribute of Unordered List: Like ordered list, type attribute is used to customize bullet style for the list of elements. By default, a solid circle is used as bullets. 77

    Chapter 11 Pages 54-92.indd 77

    02/08/18 2:44 PM

    www.tn11th.in Table: 11.4 Type value Disc Square

    Numbering style • A solid circle A solid square

    Circle

    oAn unfilled circle

    Illustration 11.17: An HTML code to demonstrate Unordered list Attribute of UL tag 326m60





    • Chennai G Hr. Sec. School, Rotler Street, Chennai 600 112.



    • Karnakata Sanga Hr. Sec. School, T. Nagar, Chennai 600 017.











    • S.M.B. Jain Hr. Sec. School, T. Nagar, Chennai 600 017.



    • Chennai G Hr. Sec. School, Nungambakkam, Chennai 600 034.











    • Chennai G Hr. Sec. School, Saidapet West, Chennai 600 015



    • Santhome Hr. Sec. School, Mylapore, Chennai 600 004.







    78

    Chapter 11 Pages 54-92.indd 78

    02/08/18 2:44 PM

    www.tn11th.in The output will be:

    3. Definition List Definition list is different from other two types of list. No bullet or number is provided for the list items. In this list type, the list element has two parts.

    (1) A definition term



    (2) The definition description

    Definition list is surrounded within
    …….
    tags. Definition term is presented in between
    …..
    tag and Definition description should be surrounded within
    …………
    tag.

    79

    Chapter 11 Pages 54-92.indd 79

    02/08/18 2:44 PM

    www.tn11th.in

    Illustration 11.18: An HTML code to demonstrate Definition list

    Definition List 2n5p6y
    HTML:
    Hyper Text Markup Language
    Webpage:
    A web page is a document that is suitable for the World Wide Web and web browsers. A web browser displays a web page on a monitor or mobile device.
    The output will be:

    Definition List

    Nested Lists:

    A list block can be defined inside another list is called as nested list.

    80

    Chapter 11 Pages 54-92.indd 80

    02/08/18 2:44 PM

    www.tn11th.in

    Illustration 11.19: An HTML code to demonstrate Nested lists Nested List 4t294x
    1. Districts of Tamilnadu
      • Chennai
      • Madurai
      • Coimbatore
    2. District of Kerala
      • Thiruvananthapuram
      • Palakkad
      • Idukki


    The output will be:

    81

    Chapter 11 Pages 54-92.indd 81

    02/08/18 2:44 PM

    www.tn11th.in Links: Link is an important feature of HTML to connect web resources. Link in HTML is used to create hyperlinks to web content. Web content may be an HTML document or an external webpage or any multimedia content such as an image, video, audio, animation etc., or even a part of the current document. There are two important things needs to create a link in HTML,

    (1) The name of the file or URL to which you want to link



    (2) The text that will serve as the clickable link.

    The anchor tag is used to create links along with HREF attribute. HREF is abbreviated as “Hypertext Reference”. Structure of an anchor tag with href: Text – Clickable link Example: Clickable text SCERT URL to load The above link code creates the target of the hyperlink to the website http://thscert.org/ index.html. At the time the clicks the link, the browser opens the home page of the URL. Internal Links: Creating a link to a particular section of the same document is known as Internal Link. To create an internal like, the attribute Name is used along with tag. The Name attribute of tag establish the link to the content within the document.

    82

    Chapter 11 Pages 54-92.indd 82

    02/08/18 2:44 PM

    www.tn11th.in

    Illustration 11.20: An HTML code to demonstrate Internal Linking: South India 2n3jm

    South India

    South India is the area encoming the Indian states of Tamil Nadu and Telangana as well as the union territories of Lakshadweep, Andaman and Nicobar Islands and Puducherry, occupying 19% of India's area (635,780 km2 or 245,480 sq mi).

    Andhra Pradesh

    Andhra Pradesh is one of the 29 states of India. Situated in the south-east of the country, it is the eighth-largest state in India. The largest city in Andhra Pradesh is Visakhapatnam.

    Karnataka

    Karnataka is a state in the south western region of India. It was formed on 1 November 1956, with the age of the States Reorganisation Act. Originally known as the State of Mysore, it was renamed Karnataka in 1973. The capital and largest city is Bangalore (Bengaluru).

    Kerala

    Kerala is a state in South India on the Malabar Coast. It was formed on 1 November 1956 following the States Reorganisation Act by combining Malayalam-speaking regions. It is divided into 14 districts with the capital being Thiruvananthapuram.

    Tamilnadu

    Tamil Nadu literally 'The Land of Tamils' or 'Tamil Country' is one of the 29 states of India. Its capital and largest city is Chennai (formerly known as Madras).



    HTML Link Colors A link will appear in all browsers by default as in the following colour: • An unvisited link is underlined and blue • A visited link is underlined and purple • An active link is underlined and red We can change the default colours, by using CSS will be discussed later. 83

    Chapter 11 Pages 54-92.indd 83

    02/08/18 2:44 PM

    www.tn11th.in External Link: Establish link with an external web page in known as external linking. It is made possible by providing the URL of the external file in the HREF attribute of tag of the current page. Illustration 11.21: An HTML code to demonstrate Linking with an external website/ webpage Links 1a652c





    Welcome to








    State Council of Educational Research and Training, Tamilnadu




    84

    Chapter 11 Pages 54-92.indd 84

    02/08/18 2:44 PM

    www.tn11th.in

    Illustration 11.22: An HTML code to demonstrate Linking with multiple pages: Linking two pages i3k3z

    Applications of OpenOffice



    ----------------------------------------------- OpenOffice Writer 1k1h1x

    OpenOffice Writer

    Writer has everything you would expect from a modern, fully equipped word processor.

    It is simple enough for a quick memo, yet powerful enough to create complete books with contents, diagrams, indexes, etc. You're free to concentrate on your ideas while Writer makes them look great.

    Back to Home

    85

    Chapter 11 Pages 54-92.indd 85

    02/08/18 2:44 PM

    www.tn11th.in

    ----------------------------------------------- OpenOffice Calc n6920

    OpenOffice Calc

    Calc is the spreadsheet application you've always wanted. Newcomers find it intuitive and easy to learn; professional data miners and number crunchers will appreciate the comprehensive range of advanced functions.

    DataPilot is an advanced technology that makes it easy to pull in raw data from corporate databases; cross-tabulate, summarize, and convert it into meaningful information.

    Back to Home

    86

    Chapter 11 Pages 54-92.indd 86

    02/08/18 2:44 PM

    www.tn11th.in

    Points to : • , , are the tags to make the text as bold, italic and underline. These tags are otherwise known as “Physical Style” tags. • Highlighting is an important formatting feature is used to call attention to the reader. The <mark> tag is used to highlight the text in HTML. • The <sub> and <sup> tags are used to create subscript and superscripts respectively. • The tag is used to change the style, size and color of text. • A font is a named set of certain style of character and number. • The
    (Horizontal Rules) tag, which is known as “Thematic Breaks” separate sections of an HTML document visually. • Table is grid of rows and columns. • The tables were officially introduced with HTML 3.2. • There are five core tags are used to create a table in HTML. • HTML s three types of lists viz. numbered, unnumbered and definition. These lists are called as Ordered List, Unordered List and Definition List respectively. • Link is an important feature of HTML to connect web resources. Link in HTML is used to create hyperlinks to web content. • Hyperlinks are considered either Internal or External links depends on their target. Workshop: 1. Write an HTML code for a webpage of your school with the following specifications:

    o A heading followed by a paragraph about your school in 10 lines using text formatting tags and attributes.



    o Include an ordered list with the subjects taught your school.

    2. Write an HTML code for a webpage of your district with the following details and features:

    o A heading followed by a paragraph of 15 sentences about the district using text formatting tags and attributes.



    o A list of the tourist places in the district. (Use Unordered list)

    87

    Chapter 11 Pages 54-92.indd 87

    02/08/18 2:44 PM

    www.tn11th.in 3. Write an HTML code to show the following table in a webpage: Students studying Computer Subjects SN School No. of Students Comp. Comp. Comp. Science Application Technology 1 Govt. HSS, M.K.B. Nagar, Chennai 39 25 62 -2 Chennai G HSS, M.H. Road, Chennai 11 123 141 87 3 Dr. GMTTV HSS, Amman Koil St., Chennai 45 76 23 79 4 Chennai G HSS, Rotler St, Chennai 112 18 63 43 5 Chennai B HSS, G.Koil St., Chennai 84 31 52 15 4. Write HTML codes to create four web pages about Population of Tamilnadu with the following description.

    o In main page write about “Population” (Refer XI Economics text book, Page No: 228229. Para 11.5) and create list with the following :



    o “Density”, “Urbanisation” and “Sex ratio”.



    o Write separate pages for “Density”, “Urbanisation” and “Sex ratio” (For contents, refer XI Economics text book, Page No: 229. Para 11.5.1, 11.5.2 and 11.5.3).



    o In main page, create link with respective pages to the list items.

    88

    Chapter 11 Pages 54-92.indd 88

    02/08/18 2:44 PM

    www.tn11th.in

    Evaluation Part – I Choose the correct answer: 1. Which of the following tags are called as physical style tags?

    (A) , ,


    B) ,
    ,



    (C) , ,

    (D) , ,

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

    (A) Highlight

    (B) Bold

    (C) Italics

    (D) Underline

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

    (A) Subject and Super

    (B) Subscript and Super



    (C) Subject and Superscript

    (D) Subscript and Superscript

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

    (A) Style

    (B) Character

    (C) Font

    (D) List

    (B)


  • (C)

    (D)


    5. Pick odd one from the list

    (A)


































































































































































    Inserting Images 5i1c6f

    Bharathiyar



























    “National







    Inserting Images 5i1c6f

    Mahakavi Bharathi

    National Poet of IndiaNational Poet of IndiaNational Poet of India
    National Poet of IndiaNational Poet of IndiaNational Poet of India
























    Attributes of <img 5h2b60 tag

    Attributes of image tag

    Parrot Image


    Parrot Image

    Parrot Image

















































    Marquee 3i265b The Government of Tamilnadu The State Council of Educational Research and Training









    Adding Multimedi Files 284f48 Govt. of Tamilnadu Logo The State Council of Educational Research and Traning









    Inline Sound 3pg3q Govt. of Tamilnadu Logo The State Council of Educational Research and Training





































































































































    Form 4j3d3

    TamilNadu State Council of Educational Research and Training, Chennai

    Name:

    :



































    HTML 3sk2y Form and Controls

    Forms and Controls

    Student Name:

    Gender: Boy Girl

    Subjects: Tamil Telugu English Physics Economics





































    tag in HTML. 3. Explain the types of list with suitable HTML code. 4. What is Link and explain the types of links. 5. Write HTML code to create the following table: A C D B F E G 91 Chapter 11 Pages 54-92.indd 91 02/08/18 2:44 PM www.tn11th.in GLOSSARY Text Formatting – Showing text with different style and colour. Font – Named set of certain style of character and numbers. Table – A Structure of rows and columns or grid of cells. Cell – An individual box in a table. Border – A line surrounded by cells. Column – Vertical structure of a table. Row – Horizontal structure of a table. Ordered List – Indents lists having numbers or letters in front of every list item. Unordered List – Indents lists having a bullet symbol in front of every list item. Definition List – Lists showing definition and definition descriptions. Link – Make connection with a part of content of same document or an external document. Hyperlink – A link from a hypertext document. Internal Link – Connecting with another part of the same document. Local Link – Internal Link External Link – Connection with another hypertext document. References: 1. Mastering HTML, CSS & JavaScript Web Publishing – Laura Lemay, Rafe Colburn, Jennifer Kyrnin – BPB Publications. 2. Informatics Practices, A text book for CBSE class XII – Sumita Arora – Dhanpat Rai & Co. 3. Computer Application (Commerce) – Text book of XII – Department of Education – SCERT, Kerala. 4. https://www.w3schools.com/html/default.asp 92 Chapter 11 Pages 54-92.indd 92 02/08/18 2:44 PM www.tn11th.in Unit III Web Page Development using HTML and CSS CHAPTER 12 HTML - Adding multimedia elements and Forms Learning Objectives: The students will learn the following: • How to insert images with HTML document. • How to insert music and movies in web pages. • What is Forms and how to create forms and controls within an HTML document 12.1 Inserting Images Images are essential element to make an HTML presentation as more attractive manner. Moreover images are used to depict many complex concepts in simple way. To make more attractive and communicative web pages, images should be added in the appropriate places. Images displayed on the web page should be converted to universally ed format. Most of the browsers s, GIF, JPEG and PNG images formats. HTML-5 introduces SVG images. One format of image can be converted to another format by using Image editing applications such as Photoshop, Picasa, GIMP etc., 12.1.1 Familiar Image Formats GIF (Graphical Interchange Format) This format is one of the popular format for animated images. It was developed by Compve. Usually this image format is suitable for presenting tiny animated images, logos, icons, line art etc., It is not suitable for photographic work, because it uses maximum of 256 colours. Animated GIF do not sound or playback control. JPEG (t Photographic Experts Group) JPEG is the most popular image format ed by all web browsers. This format is suitable for photographic images. Unlike GIF, JPEG can include any number of colours. 93 Chapter 12 Pages 93-115.indd 93 02/08/18 2:46 PM www.tn11th.in PNG (Portable Network Graphics) PNG is designed as a replacement for GIF. It is also ed by all browsers. SVG (Scalable Vector Graphics) SVG is a graphics format that was developed for web. It was standardized by World Wide Web Consortium (W3C) in 2001. All current web browsers s basic features of SVG. 12.1.2 Inserting Images with HTML document The tag along with the attribute src (Source) is used to add images in HTML document. General format: (OR) Example: Src attribute is the main attribute used to specify the file name of the image to be inserted. If the image is not in the current working folder, the image file name should clearly specify with the path of the file or URL, where the file is available. Example: Illustration 12.1: An HTML code to insert an inline image 94 Chapter 12 Pages 93-115.indd 94 02/08/18 2:46 PM www.tn11th.in The output will be: Inserting images E:\CS_TestBook_Final\ File Edit View Favorites Tools Help Bharathiyar 12.1.3 Other Attributes of tag: Other than src, the tag has many attributes the enable to control how the image is presented on the page. Alt (Alternative Text) The alt attribute within tag is used to describe the image, so that some text is conveyed even when the image cannot be displayed. Example: Width and Height: Width and Height attributes are used to set the width and height of an image. The values of these attributes should be either pixels or percentage of its actual size. If these attributes are not specified, the browser displays the image in its original size. Vspace (Vertical Space) and Hspace (Horizontal Space): 95 Chapter 12 Pages 93-115.indd 95 02/08/18 2:46 PM www.tn11th.in Vspace and Hspace attributes are used to set Vertical and Horizontal space between the images. Illustration 12.2: An HTML code to demonstrate attributes Height = 25% Height = 25% Height = 25% Height = 25% Height = 25% Height = 25% The output will be: E:\CS_TestBook_Final\ File Edit View Favorites Inserting images Tools Help Mahakavi Bharathi 96 Chapter 12 Pages 93-115.indd 96 02/08/18 2:46 PM www.tn11th.in Align: The align attribute used to aligns the image with respect to the base line of the text. This attribute has the following values. • Bottom – Aligns the bottom of the image with the baseline of the text. This is the default setting. • Middle – Aligns the middle of the image with the baseline of the text. • Top – Aligns the top of the image with the baseline of the text. Left and Right values of Align attribute: Using left and right values with align attribute, displayed the image on the left and right side of the text. Illustration 12.3: An HTML code to demonstrate baseline of text This text is aligned in the bottom of the image by default This text is aligned in the top of the image This text is aligned on the middle of the image 97 Chapter 12 Pages 93-115.indd 97 02/08/18 2:46 PM www.tn11th.in The output will be: D:\CS_TestBook_Final\ File Edit View Favorites Attributes of tag Tools Help Attributes of image tag This text is aligned in the bottom of the image by default This text is aligned in the top of the image This text is aligned in the middle of the image 12.2 Scrolling text using <Marquee> In HTML, a piece of text or image can be moved horizontally or vertically by using <marquee> tag. This feature makes a web page as more attractive. General format: <marquee> Text or image to be scroll Attributes of <marquee> Height and Width These attributes are used to set height and width of the marquee. The values should be either in pixels or in percentage of browser window. Direction This is used to specify the direction of the movement of text or image. The text or image will move towards right to left by default. So, the default direction is left. The Possible values are ‘up’, ‘down’, ‘left’ or ‘right’. 98 Chapter 12 Pages 93-115.indd 98 02/08/18 2:46 PM www.tn11th.in Behaviour: This attribute is used to specify the type of scrolling. The values are ‘scroll’, ‘slide’ and ‘alternate’. Scrolldelay: This attribute is used to define the time delay between each jump. The time unit should be in seconds. Scrollamount: This is used to define the speed of the scroll. Loop: This is for defining how many times the marquee element should repeat on the screen. The default value is ‘infinite’, which means the marquee element scrolls endlessly. Bgcolor: This is used to specify the background color to the marquee elements. Hspace and Vspace: This is for defining the horizontal and vertical space around the marquee. The value can be in pixels or percentage. Illustration 12.4: An HTML code to demonstrate marquee <marquee> , Directorate of School Education <marquee direction=right> Welcome to , Tamilnadu 99 Chapter 12 Pages 93-115.indd 99 02/08/18 2:46 PM www.tn11th.in 12.3 Adding Video and Sound Video and Sound are the core part of the modern web pages. In HTML, a video or audio content may be included as Inline or external data. The inline refers to audio or video files are handled as part of the page. These media files play the audio or video when the page is visible in the browser window. The external refers, linking external audio or video files as url. The <embed> tag is used to attach an audio or video file easily within webpage. This tag includes the controls of the multimedia automatically in the browser. The <noembed> tag may be used as an alternate to display some other media file, in the case of the browser does not <embed> tag. Src is the primary attribute used with <embed> tag. The src attribute used to specify the name of the media file with its source location. Other attributes such as alt, height, width and align are used as it is used with . General Format: <embed src = audio / video file name with location> Illustration 12.5: An HTML code to demonstrate adding audio and video files (internal source) <marquee> Welcome to , Tamilnadu <embed src="D:\CS_Videos\CS_Video.mp4" width=50% height=50%> 100 Chapter 12 Pages 93-115.indd 100 02/08/18 2:46 PM www.tn11th.in The output will be: 12.3.1 Background music: Music can be played in the background to a webpage, while the page is viewed. This is known as ‘inline’ sound or movie. The tag is used to attach an inline sound file in HTML. The src attribute is used to define the location of the media file. Volume attribute used to adjust volume control. The loop attribute defines the duration of play. The ‘infinite’ value causes the audio play as long as the page is in view. General Format: Illustration 12.6: An HTML code to demonstrate inline sound <marquee> Welcome to , Tamilnadu 101 Chapter 12 Pages 93-115.indd 101 02/08/18 2:46 PM www.tn11th.in 12.4 Working with Forms Forms are used to receive information from the . Forms are commonly used to allow s to on a Web site, to to a Web site, to order a product, and to send . In search engines, forms are used to accept the keywords for search. The tag is used to create a form. An HTML from starts with and ends with tag. Forms contain many types of form elements, such as text boxes, radio buttons, check boxes, buttons and drop-down lists. The form has a special element, which is submit button, which will submit the entries of a form to a server application to process the entries. Each element in the form is assigned a name using the name attribute. s enter values into the text boxes, or make selections from the radio buttons, check boxes, and drop down lists. The values they enter or select are ed with the name of the corresponding form element to the Web server. 12.4.1 Attributes frequently used with tag The important attributes used with the tag are method and action attributes. Method The method attribute of the form tag is used to identify how the form element names and values will be sent to the server. The get method will append the names of the form elements and their values to the URL. The post method will send the names and values of the form elements as packets. Action The action attribute identifies the server side program or script that will process the form. The action will be the name of a Common Gateway Interface (CGI) program written in programming languages like Perl, JavaScript, PHP or Active Server Pages (ASP). (This will be discussed with JavaScript in this book). General Format of tag Form elements 102 Chapter 12 Pages 93-115.indd 102 02/08/18 2:46 PM www.tn11th.in 12.4.2 Form Controls: In HTML, there are different types of form controls are used to collect data. They are Text box, , Checkbox, Radio buttons, Text area, Select box, Submit and Reset Button. HTML - Form and Co.. D:\CS_TestBook_Final\ File Edit View Favorites Tools Help Students Data Entry Form Student Name: Text Boxes Email: Girl Gender: Boy Subjects: Tamil Radio Buttons Telugu English Physics Check boxes City / Town: Madurai Select box Comments: Clear Economics Submit Push buttons Text Area Figure 12.1 HTML Form Controls 12.4.2.1 Tag Most of the form controls are created by using tag. The is an empty tag used to create different form elements or controls such as text box, radio buttons so on. Attributes of tag: Type: This attribute is used define the type of control to be created by tag. The values of type attribute is listed below: 103 Chapter 12 Pages 93-115.indd 103 02/08/18 2:46 PM www.tn11th.in Table: 12.1 Value of type attribute Description Text Create a Text Box. The element used to get all kind of text input such as name, address etc., Similar as Text box. But, while entering data, the characters are appearing as coded symbols such as asterisk. Checkbox Check box is an element appearing like a small square box. When the click on the square a tiny tick mark will appear inside the square. This element is used to select multiple options. Radio Button Radio button is used to select any one of the multiple options from the list. This element looks like a small circle, when the select an item, a tiny dot will appear within the circle. If the selects another option, previously selected option will be deselected. This means, can select any one of the given option form a group. Reset It is a special command button used to clear all the entries made in the form. Submit It is also a special command button used to submit all the entries made in the form to the backend server. Button This is a standard graphical button on the form used to call functions on click. Name: This attribute of tag is used to assign a name to the input controls. When the form is submitted, the data values are ed to the server along with the names of the controls. Value: This attribute is used to define default value to some controls. Size: This is used to set the width of the input text in of characters. It is applicable only for textbox and boxes. Maxlength: This attribute of tag is used to set the length of the input character (number of characters to be inputted) to the textbox and boxes. 104 Chapter 12 Pages 93-115.indd 104 02/08/18 2:46 PM www.tn11th.in Illustration 12.7: An HTML code to demonstrate Form and Form controls ( form) The output will be: Form D:\CS_TestBook_Final\ File Edit View Favorites Tools Help TamilNadu State Council of Educational Research and Traning, Chennai Name: : Clear Note: Data received from the can send to receiver through mail using “mailto” action. 105 Chapter 12 Pages 93-115.indd 105 02/08/18 2:46 PM www.tn11th.in Illustration 12.8: An HTML code to demonstrate Form and Form controls (Text box, checkbox and radio buttons) The output will be: D:\CS_TestBook_Final\ File Edit View Favorites HTML - Form and Co.. Tools Help Forms and Controls Student Name : Gender: Subjects: Clear Boy Tamil Girl Telugu English Physics Economics Submit 106 Chapter 12 Pages 93-115.indd 106 02/08/18 2:46 PM www.tn11th.in 12.4.2.2 <Select> Tag The <select> tag is used to create dropdown list box in HTML. It provides a list of various options as a dropdown list. This element is more helpful when a number of options are to be displayed in a limited space. The