Lesson 7

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Lesson- 7 ( Answer)

1. What type of lists are supported by HTML?


 Unordered List.
 Ordered List.
 Description List

2. Differentiate between ordered and unordered lists.


Ans. That an ordered list will have its items ordered by number, whereas
unordered lists will have just bullet points.

Ordered list:

 It has an order of items which is signified by number, Roman numeral


or alphabetical character.
 Tag - An ‘ordered list’ starts with the <ol> tag.  
 Each list item starts with the <li> tag.

Unordered List:

 It has no order of items which has a bullet preceding.  


 Tag - An ‘unordered list’ starts with the <ul> tag.  
 Each list item starts with the <li> tag

3. How you will nest an unordered list inside an ordered list ?

Ans. To nest an ordered list into an ordered list first, we need to create
an ordered list. Where the list item shall be having some sequence of
numbers, that may be ordered as alphabetical format or in numerical
format.

Explanation:
When the need arises of sub-dividing the list items mentioned, then there is
the use of an unordered list can be done. In the unordered list system,
the list item is recognized by a bullet sign or a circle or a square box.
We use <ul> tag and <ol> tag for (i) unnumbered lists (ii) numbered lists
respectively.
4. which two tags let you create the unnumbered list and numbered
list ?
Explanation:
By using <ul> tag and <ol> tag we can create the unnumbered and
numbered list in HTML. In which ul tag creates unnumbered list and ol tag
creates numbered list eventually. An ordered list can be of numerical or
alphabetical. Therefore, in HTML we have these special feature so that we
can create tags either by using <ul> tag and <ol> tag. These are very tags
use in day to day usage in HTML.

5. What is wrong with following coding ?


Ans. the start attribute must be set to a numeric value and type attribute
specifies ‘A’, ‘a’, T ‘i’ or ‘1’. So, the correct Cd is <ol type="a" starts=4>

6. What is wrong with following coding ?


Ans. <ul> is an unordered list hence we can't write it's type any alphabet or
number.
Type=''a'' and start=4 is wrong
Correct coding will be
[ul type='' circle '']
7.What is meant by inline images in HTML?
Ans. The IMG tag is used to insert images within text. These are often called
"inline" images. Note that the IMG tag is not a block tag by itself, so it must be
used only within a block element. The location of the image file should be
specified in the SRC attribute.
8. Name various types of alignments available for images.

Ans. Various types of alignments available for images in html are left,
center, right, justify, and default...in most cases default means left.

9. Which attributes of <A> facilitate external linking ?

Ans. HREF attribute in HTML is used to switch between pages. This makes
the page interactive. The syntax of this hyper link is <A HREF
http://existingwebsite.com  </A>.  We can give any existing website and
the server connects to the  link section mentioned above. When we click on
this link it will take us to the corresponding web page. There are two types
of  linking external link, where href can be used to move from one web
page to another webpage and internal linking ,in which we can move to any
page within the same webpage.

10. Write HTML code to create the following ordered list ? 

X. Xylophone
Y. Yak
Z. Zebra
Ans. An ordered list typically is a numbered list of items.

 When some numbers or notations are used to display the order


number of items in a list.
 Those indexes can be numbers, characters, or any other notations.
 The tag used for the creation of the ordered list is <OL> and </OL>
 Here, the ordered list type is character and also starts with character
X, ie, number 24.
 Therefore, the HTML code will be;
 " <OL TYPE ="A" < LI VALUE = "24" > Xylophone <LI> Yak <LI>
Zebra </OL> "

11. How would you insert and image file named elephant.jpg at the very top
of a web page ?.
Ans.  Copy the image file into the same directory folder as the HTML text
file, and type <IMG SRC="elephant.jpg"> immediately after
the <BODY> tag in the HTML text file.

12. How would you make the word "Elephant" appear whenever the
actual elephant.jpg image couldn't be displayed by a Web browser?

Ans. Use the following HTML: <IMG SRC="elephant.jpg" ALT="Elephant">

13. What is a table ? Which tag is used to create tables in HTLM ?

Ans. Table :- An HTML structure for creating rows and columns on a Web
page. The Table tag defines the overall table and the Table Row (TR) tag is
used to build each row.
Tags:- To create table in HTML, use the <table> tag. A table consist of
rows and columns, which can be set using one or more <tr>, <th>, and
<td> elements. A table row is defined by the <tr> tag. To set table header,
use the <th> tag.
14. What for are <TH> and <TR> tags used ?
Ans. The text in a cell defined by the <th> tag is bold and center-aligned. The
<table> tag is used to create a table. The <tr> tag is used to create a row in the
header, body, or footer. The <th> tag is used in the <tr> tag to define a single cell
that will contain a heading.

15. Write code to produce following HTML tags tables ?

A B C

D E F

A B C D

E F G H
Ans. Code to produce following html table:
<HTML>
<HEAD>
<TITLE> TABLE </TITLE>
</HEAD>
<BODY>
<TABLE border = “1”>
 <TR>
  <TD> A</TD>
  <TD>
   <TR> <TD> B</TD></TR>
   <TR><TD>C</TD></TR>
  </TD>
 </TR>
</TABLE>
</BODY>
</HTML>
Explanation:
After analyzing the expected output, there are only one row and two
columns. The first column has no partition and ‘A’ is expected to be printed.
The second column contains two rows and the first row needs to print ‘B’
and second row should print C. This is achieved by using the above code.
<TR> stands for Table row, <TD> stands for Table data.

16. What is the use of marquee tag ?

Ans. The HTML <marquee> element is used to insert a scrolling area of


text. You can control what happens when the text reaches the edges of its
content area using its attributes.

17. Can you scroll text only through marquee tag ?

Ans. The <marquee> tag in HTML is used to create scrolling text or image in a
webpages. It scrolls either from horizontally left to right or right to left, or vertically top
to bottom or bottom to top.

18. Write sample HTML code to scroll text “yeah! I won’’. Vertically in a webpage.

Ans. <marquee behavior="scroll" direction="up">yeah i won</marquee>


Explanation:
keyword up here can be changed foe different variations of presentation
style.
like you can write left,right etc also.

19. What are forms ?

Ans. A form is an object associated with a page that contains rules about how
the browser should display user view attributes on that page. Forms can
incorporate business logic and are often used to manipulate view data before
it is presented to the user.

20. What do understand by controls in forms ?


Ans. Controls are objects that display data or make it easier for users to enter or edit
data, perform an action, or make a selection. In general, controls make the form
easier to use. Examples of common controls include list boxes, option buttons, and
command buttons.

21. Name different types supported by HTML forms.

Ans. Let's have a look at the various types of available Form Controls in
HTML.
1)Input Text Control. Input text controls are used to collect User data as a
free text. ...
3)Input Type Radio. ...
4)Input Type Checkbox. ...
5)Input Type drop-down list. ...
7)Fieldset. ...
8)HTML output Tag. ...
9)Input type Color. ...
10)Input type Date.

You might also like