Sei sulla pagina 1di 3

Chapter 2

Creating webpages using HTML

Give one word for:

1. Smallest heading in HTML – h6

2. To display on next line - <br>

3. A comment tag in HTML is represented by this - <! ……. >

4. To display a block of text as a paragraph - <p>

5. Tag that identifies a section or division – DIV

6. Tags which are used in pairs - container tags

7. An attribute of <P> tag – Align

8. A list where all the list items are arranged in a particular order – Ordered list.

9. Two attributes of an <OL> - type and start.

10.Three values of a type attribute of an <UL> - disc, square and circle.

11.Three tags used to create a definition list are - <DL>, <DT> and <DD>.

Answer the following:

1. What are basic tags which are used in every webpage and Explain in one
sentence any two of them?
a. <HTML>, <HEAD> <TITLE> and <BODY> are the basic tags that are
used in every webpage.
b. Whatever is enclosed in the title tag appears on the title bar of the
browser window.
c. Whatever is enclosed in the body tag appears in the working area of
the browser window.

2. Explain any two points to consider while using attributes with the tags.

a. Attributes must be used inside the tag followed by a space. The value
of the attribute must be given after the = sign. If the value is more
than one word then it must be enclosed in quotations.

3. What do you understand by paragraph and line break tags?


a. <p> tag is used to set a paragraph as a separate block of text. Most
browsers generally leave one line before and after a paragraph. A line
break tag <br> is used because any use of return key in notepad does
not get displayed in the browser because HTML does not recognize
carriage return. So a <BR> tag acts like the return key.
4. What is a definition list? Explain with an example
Definition list is an indented list of terms and their definitions. Entries in a
definition list do not have any mark or number in front of them. <DL> tag to
indicate the start of the definition list, <DT> tag for indicating the term’s
definition.

5. What are ordered lists and unordered lists and how are they created in HTML.
Explain with an example.
a. Ordered List is one where all the list items are arranged in a particular order
and have a number or letter in a sequence in front of them. The <OL> tag is
used to indicate the type of list we want to create and then each list item can
be indicated with <LI>.
b. An Unordered list is similar to an ordered list except for its list are not
arranged in any particular order or sequence. An unordered list is created
with a <UL> tag with <LI> tag being used again to indicate each list item.

6. What are container tags and empty tags? Explain with examples.
a. Container tags : The tags which are used in pairs are called container tags.
The container tags have both a beginning and a closing tag. Eg <html>
</html>

b. Empty tags : The tags which are used as single and not in pairs are called
empty tags. These tags do not have any ending tag. Empty tags represent
formatting constructs such as line breaks and for inserting images.

Write the HTML code to display the following on a webpage


 Cities in Karnataka <ul> <li>cities in karnataka
1. Bangalore <ol><li>bangalore
2. Mysore<li>mysore
3. Mangalore<li>mangalore </ol>
 Cities in Tamilnadu <li> cities in tamilnadu
1. Chennai<ol><li>chennai
2. Madurai <li>madurai
3. Ooty <li>ooty </ol> <ul>

<ul>
<li> Cities in Karnataka
<ol>
<li> Bangalore
<li>Mysore
<li>Mangalore
</ol>
<li>cities in tamilnadu
<ol>
<li>Chennai
<li>Madurai
<li>Ooty
</ol>
</ul>
II. Hyperlink
A text or graphic that acts like a cross reference link.

Static pages
Already prepared HTML pages

<dl>
<dt>hyperlink</dt>
<dd> A text or graphic that acts like a cross reference link.</dd>
<dt>static pages</dt>
<dd> Already prepared HTML pages</dd>
</dl>

Explain the error the following statements

1. A definition list creates a marked list.


A definition list creates a list which does not have any markings. It is used
to create a list which defines terms. A term to be defined and the definition
of the term are created.

2. Unordered list has two attributes - type and start


Unordered list has one attribute – type. Start attribute has no meaning in
HTML as an unordered list has only bullets or other kinds of markings where
start makes no sense.

Potrebbero piacerti anche