Give one line code for the following
(a) To make “My School Web Page” as the title of a web page.
Ans: <TITLE> My School Web Page </TITLE>
(b) To change the background color of a web page to blue.
Ans: <BODY BGCOLOR="blue"> </BODY>
(c) To insert a horizontal line of yellow color
Ans: <HR color="yellow">
(d) To insert an image pic1.jpg onto web page.
Ans: <img alt="" src="https://cdn3.edurev.in/uot;https://cdn3.edurev.in/uot;pic1.jpg>
(e) To insert the list as given below:
Ans: <OL TYPE="i">
<LI> SRTHAK </LI>
<LI> SNAYAM </LI>
C. From the list given below pick the correct answer:
BGCOLOR, HEAD, HTML, VLINK, P, FONT, SIZE,I
(a) This attribute defines the size of the text in the font element.
(b) This attribute changes the background color of a web page.
(c) This tag displays text in italic.
(d) This element identifies the document as an HTML document.
(e) This element defines the HTML header and does not affect the appearance of the document.
(f) This element is used to insert a line break with extra spaces in the starting.
(g) This element changes the color of the visited link.
(h) This element displays text or characters in a specific style and size.
D. Answer the following questions:
Q1. What is the difference between ordered list and unordered list?
Unordered List classifies the data items that have equal importance i.e. none of the data items are
ranked. They are identified by a symbol. It may be a square, a circle or a disc whereas
Ordered List classifies the data items that do not have equal importance. All the data items are ranked. The ranking can be done using the numbers, the roman letter or alphabets.
Q2. Distinguish between href and name attributes of <A> tag with the help of each.
The meaning of href is hypertext reference. This attribute is mandatory in anchor tag. The href attribute takes the value as the address of the supporting document. Both the relative and the absolute links can act as values to the href attribute.
NAME attribute gives a name to the anchor tag. This attribute takes the value as “text string”. This helps in linking to a specific section within the webpage that has been named. The purpose of the name is that another anchor can link to the named anchor. For Example: <A name=”salessection”>Sales Order Set Up</A>
Q3. Define Definition term with the help of a suitable example
Definition lists (<dl>) are the list elements that have an array of tags. The list prepared by <dl> tag is similar to a dictionary. The other tags used with this are <dt> to define the definition term and the <dd> for the definition of the list item.
<dd>French word for ability to see events in the future.</dd>
<dt><b>Esprit de corps</b></dt>
<dd>French word for feeling of pride and loyalty.</dd>
Q4. Which three tags are used to create definition lists?
1. <dl> (Definition List)
2. <dt> (Defintion Term)
3. <dd> (Definition Description)
Q5. Differentiate <BODY BACKGROUND> and <IMG> Tag.
<BODY BACKGROUND> tag is used to insert image for whole web page. The image will be displayed in background while <IMG> tag defines an image which is to be inserted in webpage in foreground.
Q6. Your school’s web address is www.littlebuds.com. You want to create a link to this web site from your web page. Write the HTML code you will use to do this.
<a href="www.littlebuds.com"> My School </a>
Q7. Difference between <A> as an anchor and <A> as a link.
<A> as an anchor allow us to go from one part of the same page to another while <A> as a link allow us to go from one page to another page.
Q8. Create an ordered list of the name of the subjects you study in school.
<li> English </li>
<li> Hindi </li>
<li> Mathematics </li>
<li> Physics </li>
<li> Chemistry </li>
<li> Biology </li>
<li> History </li>
<li> Civics </li>
<li> Geography </li>
<li> Economics </li>
Q9. Name and explain the various attributes of <UL> tag.
<UL> has TYPE attribute which helps in using the symbols to create a list. This attribute takes the value as the name of the symbol.
For xample: <ul type=”square”>
Q10. How can we set the color of text that acts as a link in a web page?Explain with the help of an example.
We can set the color of text that acts as a link using <body> tag.
For example: <BODY link=”red” alink=”green” vlink=”pink”>