Monday 3 August 2015

HTML 1 (Basic HTML Elements)

HTML-I:
BASIC HTML ELEMENT

1
HTML stands for _______________?
Ans.
HTML stands for Hyper Text Markup Language.
2
What do you understand by ‘TAG’?
Ans.
A tag is a coded HTML command that indicates how part of web page should be displayed.
3
What is an attribute in HTML?
Ans.
An attribute is a special word used inside tag to specify additional information to tag such as color, alignment etc...
4
Define the tag, <HTML>?
Ans.
The <HTML> tag identifies the document as an HTML document. An HTML document begins with <HTML> and ends
with </HTML>. Here <HTML> starts the HTML tag and </HTML> ends the HTML tag.
<HTML>
…….. HTML document lines here
</HTML>
5
HR tag is used for _____________?
Ans.
The HR tag is used for draw a horizontal line.
6
<TITLE> tag is used to define ____________________.
Ans.
<TITLE> tag is used to define a title for a document.
7
What is the basic structure of HTML File?
Ans.
The basic structure of an HTML document is simple with the entire document bound by a pair of <HTML> and
</HTML> tags.
General form of HTML document:
<HTML>
<HEAD>
<TITLE> Title of page is written here </TITLE>
</HEAD>
<BODY>
The HTML tags that define your page go here
</BODY>
</HTML>
The <HEAD>…. </HEAD> tags make the header of the document and <BODY>…..</BODY> tags make the body of the
HTML document. Header - that appears on top of window and Body - that appears on the windows.
8
Face attribute is used with _____________tag and used for _______.
Ans.
Face attribute is used with Font tag and used for style.
9
To align multiple lines of text we use ______
(a) Justify
(b) DIV
(c)  Align
(d) None of these
Ans.
Align
10
What is the use of ‘size’ in <BASEFONT> tag?
Ans.
The size attribute specifies the default font-size for the text in a document.
11
List the attributes of <FONT> tag?
Ans.
Size, Face and Color
12
List and define different types of paragraph alignments.
Ans.
1.  Left - it is used for left align text.
Syntax - <p align = left> …… </p>
2.  Right - it is used for right align text.
Syntax - <p align = right> …… </p>
3.  Center - it is used for center align text.


1




Syntax - <p align = center> …… </p>
13
The value of #FFFFFF is
(a) Black
(b) White
(c)  Red
(d) None of the above
Ans.
White
14
The value of #000000 is
(a) Black
(b) White
(c)  Red
(d) None of the above
Ans.
Black
15
State True or False.
(a)  <BR> tag has its closed tag as </BR>
(b) <P> tag has no closing tag
(c)  <HR> tag is same as <BR>
(d) <KBD> tag is used to display tables
Ans.
(a)  <BR> tag has its closed tag as </BR> - False
(b)  <P> tag has no closing tag -False
(c)  <HR> tag is same as <BR> - False
(d)  <KBD> tag is used to display tables - False
16
The default alignment of text is ________, default text color is ________and the default background color is
____________.
Ans.
The default alignment of text is left, default text color is black and the default background color is white.
17
Give the coding for giving the heading ‘PACE Computer Education’ of <H1> tag, font style as Comic Sans MS, text
color as blue. Body text color as red, background as green, alignment as center, font style of body text as Brush
script, size=15. The text for body is as follows:
Education is the
ability to listen to almost
anything without
losing your temper
or your
self confidence.
Ans.
<html>
<head>
<title>example</title>
<h1><font color="blue" face="Comic Sans MS">PACE Computer Education </font> </font> </h1>
</head>
<body bgcolor="green" text="red" align="center" >
<font size=15 face="Brush script">Education is the<br/>
ability to listen to almost<br/>
anything without<br/>
losing your temper<br/>
or your<br/>
self confidence.</font>
</body>
</html>
18
What is wrong in the following coding?
(i)           <HEAD> <MY web page>
<TITLE> Welcome to My Web page







</HEAD>
</TITLE>
(ii)          <FONT name = “Arial”,
type = “Bold” size=3>
(iii)         <FONT face = comic sans ms color = Red>
(iv)         <FONT color = #345678
(v)          <BODY color = “Red” background = “Myimage.jpg”>
(vi)         <BR>        </BR>
(vii)        <P Font face = “Arial” color = “Blue”>
(viii)      <Body Margin Top = 60 Left = 75>
Text with changed margin </Body>
(ix)         <BASEFONT SIZE = 5>
<BODY> Text with New format</BODY>
(x)          <HTML><HEAD>
<TITLE> New Page
</HEAD>
</TITLE>
</HTML>
Ans.
Correct Coding
(i)            <HEAD> MY web page
<TITLE> Welcome to My Web page
</TITLE>
</HEAD>
(ii)           <FONT face=”Arial” size=3><b>………..</b></FONT>
(iii)          <FONT face=”comic ms sanc” color=”red”>
(iv)         <FONT color=”#345678”>
(v)          <BODY bgcolor=”red” background=”Myimage.jpg”>
(vi)         <BR>
(vii)        <p><Font face=”Arial” color=”Blue”></Font></p>
(viii)       <Body topmargin=”60” leftmargin=”75”>
Text with changed margin </Body>
(ix)         <BODY> <BASEFONT SIZE = 5>Text with New format</BODY>
(x)          <HTML><HEAD>
<TITLE> New Page
</TITLE>
</HEAD>
</HTML>
19
Differentiate between <TITLE> and <HEAD> tags?
Ans.
The <TITLE> tag defines the document title. It contains plain text. It is used inside <HEAD>….. </HEAD> tags
whereas, The <HEAD> tag defines the function header. It contains <TITLE> tag. It is used inside <HTML>… </HTML>
tags.
20
Differentiate between container and empty elements?
Ans.
Container elements are those HTML elements that require pair tags i.e., a starting tag as well as an ending tag. For
example, < title >… < /title > whereas, Empty elements require just a starting tag and not an ending tag. For
example, < br > breaks a line.
21
Differentiate between <BR> and <P> tags.
Ans.
< br > stands for “line break”. It starts a new line within the current paragraph, but it does not start a new
paragraph wheras, < p > stands for "Paragraph". Typing < p > says that you are starting a new paragraph, and typing
< /p > says that you are ending one.
22
List and define different types of heading tags.
Ans.
HTML has six levels of headings, numbered 1 through 6, with 1 being the largest. Headings are typically displayed in


3


larger and/or bolder than normal body text.
the syntax of the heading elements is:
<H>  Text of heading </H>
Example:
HTML:                                                                         Displayed As:
<h1>Heading 1</h1>
Heading 1
<h2>Heading 2</h2>
Heading 2
<h3>Heading 3</h3>                                            Heading 3
<h4>Heading 4</h4>                                            Heading 4
<h5>Heading 5</h5>                                            Heading 5
23
List and explain the different attributes of body tag?
Ans.
Attribute                             Description
alink                                       Specifies the color of an active link in a document.
<body alink="green">

background                        Specifies a background image for a document.
<body background="../images/back.gif">

bgcolor                                 Specifies the background color of a document.
<body bgcolor="green">

link                                         Specifies the color of unvisited links in a document.
<body link="blue">

text                                        Specifies the color of the text in a document.
<body text="#FF0000">

vlink                                       Specifies the color of visited links in a document.
<body vlink="#AAAAFF">

leftmargin                           Sets a left hand margin for your body element.
<body leftmargin = 60>

topmargin                           Sets a margin along the top of your body element.
<body topmargin = 75>
24
What is the difference between basefont and font tag?
Ans.
The <BASEFONT> tag is used to define basic font size for HTML page. Once set, this font size is applicable to all the
text following it, for which no other size has been specified.
The <FONT> tag, on the other hand, lets one define size, style, and color of short segment of text. Once </FONT> is
reached, the following text is rendered in default font size set by <BASEFONT>.
25
How can a 2D or 3D horizontal rule be displayed?
Ans.
Without noshade attribute in <HR>, the default 3-D rule is displayed and with noshade attribute a 2-D rule is
displayed.
26
What are logical and physical text styles?
Ans.
The logical text styles render the text according to its meaning e.g., <DFN> is used to display definitions. The
handlings of logical styles vary with browser to browser. <DSFN>, <EM>, <CITE>, <CODE>, <KBD>, <SAMP>,
<STRONG>, <VAR> are logical text styles.
The physical text styles indicate a specific type of appearance for a section e.g., bold, italic etc. The physical styles
are handled identically by all browsers. <B>, <I>,<U> and <TT> are physical text styles.


4


27
How can different tags be combined in HTML? What is its use?
Ans.
HTML allows you to combine various tags together so as to achieve the desired result and effect. You can try and
combined many tags.
Following are the example of the combine tags:
<H1> <Font color = “blue”> Heading 1 </H1>
It is used to apply multiple formatting conventions to the same text.
28
What all tags are required in every HTML page?
Ans.
<html>, <head>, <title>, and <body> (along with their closing tags, </html>, </head>, </title>, and </body>).
29
Write the HTML code for the following to appear one after the other:
  A small heading with the words, “We are Proud to Present”
  A horizontal rule across the page
  A large heading with the one word, “Orbit”
  A medium-sized heading with the words, “The Geometric Juggler”
  Another horizontal rule
Ans.
<html>
<head><title>example</title></head>
<body>
<h3>We are Proud to Present</h3>
<hr />
<h1>Orbit</h1>
<h2>The Geometric Juggler</h2>
<hr />
</body>
</html>
30
Insert the appropriate line break and Para-graph break tags to format the following poems with a blank line
between them:
Good night, God bless you,
Go to bed and undress you.
Good night, sweet repose,
Half the bed and all the clothes.
Ans.
<html>
<head><title>Poem</title>
</head>
<body>
<p>Good night, God bless you,<br />
Go to bed and undress you.</p>
<p>Good night, sweet repose,<br />
Half the bed and all the clothes.</p>
</body>
</html>
31
Write the complete HTML Web page with the title “Foo bar” and a heading at the top which reads “Happy Hour
at the Foo Bar”, followed by the words “Come on Down!” in regular type.
ANs.
<html>
<head><title>Foo Bar</title></head>
<body>
<h1>Happy Hour at the Foo Bar</h1>
Come on Down!
</body>
</html>
32
How would you say, “We’re having our annual Impeachment Day SALE today,” in normal-sized blue text, but with
the word “SALE” in the largest possible size in bright red?
Ans.
<html>
<head>


5




<title>
example
</title>
</head>
<body>
<font color="blue">We're having our annual Impeachment Day
<font color="red" size=7>SALE</font> today!</font>
</body>
</html>
33
Write the name of HTML tag used to include numbered list in a HTML Web Page.
Ans.
<OL>……. </OL>
34
Write HTML code for the following:
To provide hyperlink to a website “http://www.cbse.nic.in”
Ans.
<html>
<head>
<title>
link
</title>
</head>
<body>
</body>
</html>

15 comments:

  1. It was really a nice article and i was really impressed by reading this
    Ruby on Rails Online Course

    ReplyDelete
  2. I really thank you for the valuable info on this great subject and look forward to more great posts. Thanks a lot for enjoying this beauty article with me. I am appreciating it very much! Looking forward to another great article. Good luck to the author! All the best! Cakes In Georgia

    ReplyDelete
  3. Thank you very much for your excellent ans on this chapter. Best for students.

    ReplyDelete
  4. Thank you so much for these answers. They helped me a lot.....

    ReplyDelete
  5. I have recently started a blog, the info you provide on this site has helped me greatly. Thanks for all of your time & work. cinema

    ReplyDelete
  6. YouTube - VIVOZA - Videoslapse | VIVOZA - CTVR
    YouTube. YouTube. YouTube. Youtube. Videoslapse. Facebook. YouTube. YouTube. YouTube. YouTube. Youtube. YouTube. YouTube. YouTube. YouTube. YouTube. YouTube. YouTube. youtube to mp3 converter YouTube.

    ReplyDelete