WEB TECHNOLOGIES ANSWERS
ESSAY QUESTIONS
QUESTION 1:
Html Lists:
List represents a group of items of same type. HTML support
three types of Lists, They are
- Ordered Lists or Numbered Lists
- Unordered Lists or Bulleted Lists
- Definition Lists
- Ordered Lists or Numbered Lists:
Ordered List represents the group
of items that are arranged in specific or particular order i.e. all the
elements are prefixed by a symbol that denotes their relative order.
Syn: <ol>
<li>-------</li>
</ol>
Ex: Fruits list
<ol>
<li> Apple</li>
<li> Pine Apple</li>
<li> Mango</li>
<li> Grapes</li>
<li> Banana</li>
</ol>
Here <Ol> means Ordered
list, <li> means List item. </li> tag is optional because the
browser treats as the end of a list item when new list item begin.
The following are the list of
attributes that support Ordered list.
I. Type:
It specifies the style of a list
item in ordered list with the values 1, A, a, I, i.
By default the list items in
ordered list are represented by Numbers.
Syn: <ol
type=”1/A/a/I/i”>
<li>------</li>
</ol>
Ex:
<ol type=”I”>
<li>
Apple</i>
<li>Mango</li>
</ol>
II. Start:
It specifies
the starting number of the list item in an ordered list other than 1.
Syn:
<ol start=”5”>
<li>------</li>
</ol>
Ex:
<ol start=”5”>
<li>
Apple</i>
<li>Mango</li>
</ol>
- Unordered Lists or Bulleted Lists:
Unordered List also represents the
group of items but they are not arranged in any specific or particular order
i.e. all the elements are marked with bullets.
Syn: <Ul>
<li>-------</li>
</Ul>
Ex: Vegetables list
<Ul>
<li> Tomato</li>
<li> Carrot</li>
<li> Brinjal</li>
<li> Ladies
finger</li>
<li> Chillies</li>
</Ul>
Here <Ul> means Unordered
list, <li> means List item. </li> tag is optional because the
browser treats as the end of a list item when new tag begin.
The following are the list of
attributes that support Unordered list.
I. Type:
It specifies the style of a list
item in unordered list with the values circle, square and disc. By default the
list items in unordered list are represented by shaded disc.
Syn: <ul
type=”circle/square/disc”>
<li>------</li>
</ul>
Ex:
<ul type=”square”>
<li>
Tomato</li>
<li>
Carrot</li>
</ul>
- Definition Lists:
Definition List is a set of
Definitions in which each item has two parts, a Definition term (dt) and its
Description of Definition term(dd) in pairs.
Syn:
<dl>
<dt>-------</dt>
<dd>-------</dd>
</dl
Ex:
<dl>
<dt>HTML</dt>
<dd>Hyper Text Markup tage</dd>
<dt>SGML</dt>
<dd>Standarised Text Markup </dd>
<dt>XML</dt>
<dd>Extensible Markup tage</dd>
/dl>
Here <dl> means Definition
list, <dt> means Definition term and <dd> means Description of
Definition term. </dt> and </dd> tags are optional because the
browser treats as the end of a list item when new tag begin.
QUESTION 2:
1) CSS with in head
section
The following example describes the simple use of style tag
in head section and also changes headings
<html><head><title>Simple
Stylesheet</title>
<style>
<!---
h1{
color: red;
border: thin groove;
text-align: center;}
--->
</style>
</head><body>
<h1>Simple Stylesheet</h1>
</body></html>
Notice style definition inside an HTML comments so that it
will be ignored by browsers which don’t support styles.
2) CSS with in body
section
The following example describes the use of styles in body
section by using the style attribute in its corresponding tag.
<html>
<head><title>Simple
Stylesheet</title></head>
<body>
<h1 style=”color: red; border: thin groove; text-align:
center ;”>
Simple Stylesheet</h1>
<h2 style=”color: blue; text-align: right;”>
</body></html>
3) CSS through
External file
The following example describes
the linking of External CSS file by using Link tag.
<html>
<head><title>Simple Stylesheet</title>
<link rel="stylesheet"
type="text/css" href="sample.css" /></head>
<body>
<h1 style=”color: red; border: thin groove; text-align:
center ;”>
Simple Stylesheet</h1>
</body></html>
Sample.css
h1{Color:red;text-align:center;border: thin groove;}
SHORT ANSWERS
QUESTION 1:
Heading Tags:
The first thing that the most readers notice while viewing any page of text is Headings and Sub-headings. Hence, Html provides Six types of heading tags to display the text in
Various sizes such as H1, H2, H3, H4, H5 and H6. The largest heading is H1 and smallest heading is H6. These HTML Headings are very useful for dividing the document in Sections and Sub-sections.
Syn: <Hi> ----- </Hi> where i=1, 2, 3, 4, 5 and 6.
Ex: <H1> Headings </H1>
<H2> Headings </H2>
<H3> Headings </H3>
<H4> Headings </H4>
<H5> Headings </H5>
<H6> Headings </H6>
QUESTION 2:
Hypelinks:
In the word “Hyperlink”, Hyper means Jumping and Link means Connection.
A hyperlink is a word, phrase, or image that you can click on to jump to a new
document or a new section within the current document. Hyperlinks are found in
nearly all Web pages, allowing users to click their way from page to page. Text
hyperlinks are often blue and underlined. When you move the cursor over a
hyperlink, whether it is text or an image, the arrow should change to a small
hand pointing symbol at the link. When you click it then the hyperlink will
connect to the address as referred by the user.
In Html, The Hyperlink creation can be done with the help of Anchor tag and It contains following three basic parts.
In Html, The Hyperlink creation can be done with the help of Anchor tag and It contains following three basic parts.
- The Beginning and Ending Anchor tag pair (<A>------</A>).
- The href attribute that specifies the URL of the page to be loaded when the hyperlink is selected.
- The Text or Image that appears as the active Hperlink.
The following are the list of attributes that describe
anchor tag.
- Href: It specifies the URL of the page to be loaded when the hyperlink is selected.
Syn: <a href=”URL”> ----- </a>
Ex: <a href=”D:\Samples\hyper.html”>Hyper </a>
- Target: It allows to specify where the linked document should open with the values _blank, _self and _parent.
Syn: <a href=”URL” target=”targetname”> ----- </a>
Ex: <a href=”URL” target=”_blank”> Sample </a>
- Name: It allows to create
an identification name for the Hyperlinks.
Syn: <a href=”URL” name=”name of the Hyperlink”> -----
</a>
Ex: <a href=”URL” target=”_blank” name=”sample”> Sample
</a>
QUESTION 3:
QUESTION 5:
QUESTION 4:
Classes:
HTML language allows to apply the CSS properties only for
selected tags with the help of classes. A Class is an identification which should
be called inside a tag with the help of class attribute. The class type of CSS
can be defined as follows
Syntax: Selector.class=classname
{property: value; property2: value ;……}
<selector class=classname>
Ex:
<html>
<head><title>Classes </title>
<style>
p.x
{
background-color:yellow;color:red;border:thick groove;
}
</style></head>
<body>
<p class="x">This is the paragraph with
Cascading Style Sheets.</p>
</body></html>
Anonymous Classes:
An Anonymous class is identification for CSS where the
styles can be applied to any selector. It provides a way of defining styles
within reusable classes.
Syntax: .class=classname
{property: value; property2: value ;……}
<selector class=classname>
Ex:
<html>
<head><title>Anonymous Classes</title>
<style>
.x
{
background-color:yellow;color:red;border:thick groove;
}
</style></head>
<body>
<p class="x">This is the paragraph with
Anonymous Classes.</p>
<h1 class=”x”>Anonymous Classes</h1>
</body></html>
No comments:
Post a Comment