Class 10 Computer Application 165 HTML – Basic HTML Elements Question Answer


By Anjeev Kr Singh – Computer Science Educator
Published on : August 26, 2022 | Updated on : March 5, 2023

HTML – I : Basic HTML Elements

Important Question Answer


Que 26. Write the HTML code to do the following: –

  • background is blue, text color is red, links that have not visited yellow, visited links are lime and links blink white when someone click.

Answer: <BODY bgcolor = “blue” text = “red” link = “yellow” vlink = “lime” alink = “white”> … </BODY>

Que 27. What do you mean by heading tags? How many types of heading tags? Write them.

Answer: In HTML, heading tags are used to make a heading. There are six types/levels of heading. <h1>, <h2>, <h3>, <h4>, <h5>, & <h6>.

Que 28. (a) What is the default alignment of Heading tags?

(b) Which attribute is used to change the alignment?

(c) Give examples.

Answer: (a) Left

(b) ALIGN

(c) Examples are : –

<h1 align = “left” > mycstutorial.in </h1>

<h1 align = “right” > mycstutorial.in </h1>

<h1 align = “center” > mycstutorial.in </h1>

Que 29. Write an example to demonstrate the uses of BODY tag attributes and heading tags.

Answer: Example:

<!DOCTYPE html>
<html lang='en>

<head>
<meta charset = "utf-8" />
<title> Demonstraton of Body Tag and Heading Tags </title>
</head>

<body bgcolor = "black" text = "white" topmargin="40" leftmargin = "30" link = "cyan" vlink = "red" alink="yellow">
<!-- Comment in HTML -->

<h1>mycstutotial.in</h1>
<p>HTML Question Answer - Computer Application</p>
<h2 align = "right"> MCQ's </h2>
<h3 align = "left"> Question Answer </h3>
<h4 align = "center">CBQ </h4>
<h5>Sumita Arora Book Solution </h5>
<h6>Visit www.anjeevsinghacademy.com</h6>

</body>

</html>

The output of Q 29: –


mycstutotial.in

HTML Question Answer – Computer Application

MCQ’s

Question Answer

CBQ

Sumita Arora Book Solution
Visit www.anjeevsinghacademy.com

Que 30. Write the name FOUR tags used for Text Formatting.

Answer: <P>, <BR>, <BASEFONT>, <FONT>, <B>, <I>, <U>

Que 31. Write the name of the tag used in HTML to create a paragraph.

Answer: <P>

Que 32. Write the name tag which is used to break the line.

Answer: <BR>

Que 33. Which tag in HTML other than <BR>, also break the line?

Answer: <P>, <HR>

Que 34. Write the similarity and differences between <P> and <BR>.

Answer: Similarity: – <P> and <BR> both tags can break the line.

Differences:-

  • <P> tag creates a paragraph and it inserts a blank line before the beginning of the paragraph, while <BR> tag breaks the line.
  • <P> is a container tag while <BR> is an empty tag.
  • <P> tag has one attribute ALIGN while <BR> tag has no attribute.

Que 35. Create an HTML document having three paragraphs with a breaking of lines.

Answer: HMTL Code: –

<html>
<head> <title> Paragraph and Line break </title> </head>
<body>
<P align = "left"> This is my left aligned Paragraph. <BR> Now i'm 
brekaing <BR>
my line. By default paragraph is left aligned. </P>
<P align = "center"> This is my second paragraph aligned centrally. 
Writing text in another line does break it physically. Browsers does not
recognize returns, tabs or multiple spaces</P>
<P align = "right"> This is my third paragraph aligned right side. </P>
</body>
</html>

The output of Q 35: –


This is my left aligned Paragraph.
Now i’m brekaing
my line. By default paragraph is left aligned.

This is my second paragraph aligned centrally. Writing text in another line does break it physically. Browsers does not recognize returns, tabs or multiple spaces

This is my third paragraph aligned right side.


Que 36. Which tag can you use to align text, image, table, etc to the center?

Answer: <CENTER>

Que 37. What is the <CENTER> tag?

Answer: In HTML, the <CENTER> tag is used to centralize the segment of text, image, table, etc. Just type the text between <CENTER> and </CENTER> tags and your text will appear centralized in the browser window.

For example: <CENTER> www.mycstutorial.in </CENTER>

Que 38. What types of font sizes are used by web browsers?

Answer: Most web browsers use the relative model of font sizes. These relative sizes are range from 1 (the smallest) to 7 (the largest).

Que 39. What is the default relative font size and which tag set it?

Answer: The default relative font size is 3. Set by BASEFONT tag.

Que 40. What is <basefont> tag?

Answer: The <BASEFONT> tag allows you to define the basic size, face and color of the text in HTML document. The browser will apply the effect of basefont on the text for which no other font-size , font-face and font-face setting has been provided.

The ending tag </BASEFONT> is optional.

Que 41. What is the <font> tag?

Answer: The <font> tag is used to change the size, style (face) and color of text. It is generally used for changing the appearance of a short segment of text.

Que 42. What value can you assign to the size attribute of the BASEFONT and FONT tag?

Answer: The value of the size attribute of <font> or <basefont> can either be given an absolute value form 1 to 7 e.g. size = 5, or it can be a relative value e.g., size = +1 or size = -2.

Que 43. What do you mean by size = +2 and size = -2?

Answer: size = +2 means size is increased by 40% of base size and size = -2 means size is decreased by 40% of base size. +1 or -1 refer to 20% increase or decrease respectively.

Que 44. Write one example to demonstrate the uses of size attribute of <BASEFONT> and <FONT>.

Answer: Using of size attribute of <BASEFONT> & <FONT>

<html>
<head>
   <title> Demonstration of size attribute </title>
</head>
<body>
 <BASEFONT size = 4>
   Hello this text size = 4 <BR>
 <FONT size = +2>
  Hi this text size is +2 i.e 4 + 2 = 6 <BR>
 </FONT>
 <FONT size = 5>
   Hey this text size is 5 <BR>
  <FONT>
  <FONT size = -2>
   Oh this text size is -2 i.e 4 - 2 = 2 <BR>
  </FONT>
 </BASEFONT>
</body>
</html>

Que 45. In How many ways you can change the color of document text and selected text in HTML?

Answer: The text color of the document can be changed by the text attribute of the <BODY> tag and the color attribute of the <BASEFONT> tag.

The text color of the specific text can be changed by the color attribute of the <FONT> tag.

Que 46. Demonstrate the changing of text color using <BOdy> & <FONT> tag with the help of HTML code.

Answer: Changing text color

<html>
<head> <title> uses of color attribute </title> </head>
<body text = red>
 
     Hello this text in red color <br>
     <FONT color = green> But i in  Green color </FONT>
     Oh, but my color is red.
</body>
</html>

Output:

Que 47. Demonstrate the changing of text color using <BOdy> & <FONT> tag with the help of HTML code.

Answer: Changing text color



About the Author

Anjeev Kr Singh

Anjeev Kr Singh

Computer Science Educator, Author, and HOD. Guiding CBSE students in CS, IP, IT, WA & AI via mycstutorial.in. Creator of Question Bank for Class 10 & 12 students.

You cannot copy content of this page

Scroll to Top