Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Que 18. What is Wrong in the following coding?

(i) <HEAD> <my web page>

<TITLE> Welcome to My Web Page

</HEAD>

</TITLE>

Answer: </TITLE> comes before the </HEAD>

(Ii) <FONT name = “Arial”, type = “Bold” size = 3>

Answer: name and type are invalid attributes of <FONT>. It may be used like <FONT face = “Arial”
size = 3> <b> ….. </b> </FONT>

(iII) <FONT face = comic sans ms color = Red>

Answer: Attribute values are not written inside the quotation. <FONT face=”Comic sans MS” color
= “RED”>

(iv) <FONT color = #345678

Answer: The hexadecimal color code is not written inside the quotes. It should be like – <FONT
color = “#345678”>

(v) <BODY color = “Red” background = “Myimage.jpg”>

Answer: color is an invalid attribute of <BODY> tag. It should be written like <BODY background =
“Myimage.jpg” text = “red”>

(vi) <BR> </BR>

Answer: <BR> is an empty tag. </BR> is the invalid.

(vii) <P Font face = “Arial” color = “Blue”>

Answer: > is missing after P. The correct code is <P> <FONT face = “Arial” color = “Blue”>
</FONT> </P>

(viii) <Body Margin Top = 60 Left = 75> Text with changed margin </Body>

Answer: The body tag has two attributes for margin – topmargin and leftmargin.

<BODY topmargin = 60 leftmargin = 75> Text with changed margin </BODY>

(ix) <BASEFONT SIZE = 5> <BODY> Text with New format </BODY>

Answer: <BASEFONT> tag will come inside the <BODY> tag. The corrected code is –

<BODY> <BASEFONT size = 5> Text with New format </BODY>

(x) <HTML> <HEAD> <TITLE> New Page </HEAD> </TITLE > </HTML>

Answer: </TITLE> comes before the </HEAD>. The corrected code is

<HTML> <HEAD> <TITLE> NEW PAGE </TITLE></HEAD> </HTML>

Que 19. Differentiate between <TITLE> and <HEAD> tags.


Answer: <TITLE> vs <HEAD>

<TITLE> tag <HEAD> tag

The <TITLE> tag contains the document title. The title specified inside
The <HEAD> tag contains
the <TITLE> .. </TITLE> tag appears on the browser’s title bar.
title, scripts used, style d
The <TITLE> tag is entered between the opening and closing <HEAD>
The <HEAD> tag is writt
tags.

Que 20. Differentiate between the container and empty elements.

Answer: Container Element vs Empty Element

Container Element Empty Element

Container Elements: – Elements that require starting as well as ending Empty Elements: –
tags. For example- <head> .. </head> , <body> .. </body>, etc. an ending tag. For ex
An ending tag is similar to that of a starting tag except that it begins with a
slash (/) symbol. It is also known as v

Pages: 1 2 3 4

You might also like