Friday 6 July 2018

Short & Long Answer Questions on HTML


HTML
Short Answer Questions
1.       What is tag in HTML?
Ans: HTML is a language used to design web pages. Its full form is Hyper Text Markup Language.

2.       Differentiate between BR and P tags
Ans: <P> tag is a container element which marks a block of text as a paragraph in a webpage and the web browser leaves a line between two paragraphs. This tag has an attribute ALIGN, which can take three values - left, right and center. E.g- <P ALIGN=“right”> Learning HTML is really fun . </P>
<BR> tag is an empty element that is used to break a line and display the proceeding text from the next line, without giving any space between two lines. It has no attribute. E.g- You are your biggest critic <BR> .

3.       Define different types of paragraph alignment.
Ans: <P> tag has an attribute ALIGN, which can take three values - left, right and center . E.g- <P ALIGN=“right”> Learning HTML is really fun . </P>

4.       What and how may are heading tags?
Ans: HTML defines six levels of headings. A heading element implies all the font changes, paragraph breaks before and after, and any white space necessary to render the heading. The heading elements are H1, H2, H3, H4, H5, and H6 with H1being the highest (or most important) level and H6 the least

5.       How do you combine two container tags?
Ans: Two container tags can be combine together by nesting them.

6.       What are essential tags required in an HTML document?
Ans: <HTML> and <BODY> are essential tags required in an HTML document.

7.       What are default type face, default font size and default colour of a text in HTML document?
Ans: By default the font face is “Times New Roman”, size 16px i.e “3” is and the default colour is “Black”.

8.       What is the use of background attribute of BODY tag?
Ans: Background attribute is used to specify a background graphics or image, which will be displayed behind the text and other contents of the web page.
The Syntax is: <BODY background = “image filename” >

9.       What is a list? How many types of lists may be created in HTML?
Ans: List is a collection or set of many items, each specified in a separate line. A list may be numbered or unnumbered.

10.   What is a definition list? How it is created?
Ans:  A definition list contains some terms and their definitions (or descriptions). A definition list is created by <DL> tag. Its definition term is created by a <DT> tag and its description is created by <DD> tag. The definition tag is ended by </DL> tag.



Long Answer Questions
1.       Differentiate between FONT and BASEFONT tags.
Ans: The BASEFONT tag is used to define the basic font size, colour and face, which is applied to all text for which these attributes are not defined by other tags.
        On the other hand, the FONT tag is used to define font for the text contained within this container element. The effect of FONT tag ends as soon as the ending FONT tag is encountered. The following text is then affected by default settings.

2.       Differentiate between Logical and Physical text styles.
Ans: Logical text styles are those HTML tags, whose interpretation is depend on the browser program. The way of handling these styles vary from browse to browser. For example, <DEF>, <EM>, <STRONG> are some logical text styles.
        On the other hand physical text styles are independent of browsers. They always produce same effect with all browser programs. For example <B>, <I>, <U> are some physical styles.


3.       Write the basic structure of an HTML document.
Ans: The basic structure of HTML is:
<HTML>
                        <HEAD> <TITLE> …page title….</TITLE> </HEAD>
                        <BODY> ….body text….</BODY>
                        </HTML>

4.       How different formatting tags are combined in HTML?
Ans: HTML uses elements like <b> and <i> for formatting output, like bold or italic text.
Formatting elements were designed to display special types of text:
  • <b> - Bold text
  • <strong> - Important text
  • <i> - Italic text
  • <em> - Emphasized text
  • <mark> - Marked text
  • <small> - Small text
  • <del> - Deleted text
  • <ins> - Inserted text
  • <sub> - Subscript text
  • <sup> - Superscript text

5.       Write a short note on Headings in HTML.
Ans: HTML defines six levels of headings. A heading element implies all the font changes, paragraph breaks before and after, and any white space necessary to render the heading. The heading elements are H1, H2, H3, H4, H5, and H6 with H1 being the highest (or most important) level and H6 the least.

6.       How many types of tag elements are used in HTML? Describe them.
Ans: There are two types of tags in HTML, first those used in pairs and second others used singly. These two types of tags make two types of elements in HTML: Container tags and Empty elements.
Container elements includes starting tag as well as ending tag, eg <TITLE>….</TITLE> whereas Empty elements include just starting tag and not an ending tag, eg <BR>.

7.       List and explain different attributes of BODY tag.
Ans: The HTML <body> tag defines the main content of the HTML document or the section of the HTML document that will be directly visible on your web page. This tag is also commonly referred to as the <body> element.
In HTML, the syntax for the <body> tag is:
<body>….body text ….</body>
Attributes
The following is a list of attributes that are specific to the <body> tag:
Attribute
Description
alink
Color of text for selected hyperlinks
background
Image to be used a background
bgcolor
Background color
link
Color of text for unvisited hyperlinks
text
Foreground color of text
vlink
Color of text for visited hyperlinks


8.       Describe the use of HR tag.
Ans: This tag provides you the facility of drawing horizontal lines to separate various parts of your web page. The horizontal line produced with this tag is drawn across the width of the browser window in proportionate size. By default the rule is aligned at centre.
Attributes are: size, width, color and noshade

9.       Differentiate between and ordered list and unordered list.
Ans: Ordered lists are those lists in which each item is preceded by  some sequence number. Such lists are created by <OL> tag.
Unordered lists are those lists in which each item is preceded by a special symbol called bullet. Such lists are created by <UL> tag.

10.   Describe steps for creating and ordered list.
Ans: Start with <OL> tag then write the list items in <li>…</li> tags then close the order list tag with </ol>. For Example:
<ol>
  
<li>Coffee</li>
  
<li>Tea</li>
  
<li>Milk</li>
</ol>




11.   How do you create a definition list.
Ans: A definition list is created by <DL> tag. Its each definition term is created by <DT> tag and its description is created by <DD> tag. The definition list is ended by </DL> tag.
Example :
HTML Code
Output
<html>
<body>
<dl>
  <dt>Coffee</dt>
  <dd>Black hot drink</dd>
  <dt>Milk</dt>
  <dd>White cold drink</dd>
</dl>
</body>
</html>
Coffee
Black hot drink
Milk
White cold drink




No comments:

Post a Comment

MCQ Question Bank Microsoft PowerPoint