0% found this document useful (0 votes)
27 views

HTML Notes

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

HTML Notes

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

HTML

Q.1 : What is HTML ?


Ans.: 1) It is the most simple, text oriented programming language.
2) HTML stands for HyperText Mark-up Language,used to create world wide web document.
3) Using this language user can create web pages which can be viewed in any web browser
such as Netscape Navigator or Internet Explorer.
4) Hypertext is ordinary text with extra features such as formatting, image, multimedia and
links to other documents.
5) Mark-up is the process of taking ordinary text and adding extra symbols, such as editor’s
proof reading symbols. Each of the symbol used for mark-up in HTML is command that
tells the browser how to display the text.
6) Mark-up language are special type of computer languages. They are concerned with only
parts of documents according to their functions.
7) They indicate which part of document is title,which is subheading,which is author’s name
and so on.
8) HTML is essentially a set instructions to web browser for formatting and layout of web
pages.
9) HTML is not a programming language in real sense.
Q.2 : Explain features of HTML.
Ans.: 1) Hypertext Markup Language or HTML is set of codes that is used to create document and
then it can be published on the World Wide Web.
2) HTML lets user jump from topic rather than finding and reading information linearly.
3) Documents prepared in HTML include reference graphics and formatting tags.
4) HTML is hyperlink specification language.
5) HTML supports to frames including target windows and borderless frames.
6) It containt powerful formatting facilities for text, page, image etc.
7) It defines the syntax and placement of special embedded directions which are not displayed
by the browser but it tells the browser how to display the contents of the document.
8) It supports for .BMP and animated .GIF image.
9) HTML support forms which make it possible to create documents that collect and process
user input.
10) It tell how to make a document interactive through special hypertext links.

Q.3 : What are advantages of HTML ?


Ans.: The advantages of HTML are as enlisted below :
1) For creating HTML document, only text editor is needed.
2) No special software is needed.
3) HTML document can be created on any hardware platfrom using any text editor.
4) HTML is easy to learn, use of implement.
5) Contains powerful formatting facilities.
6) Required HTML pages can be updated easily, without changing whole document.
7) Any HTML document can be traversed due to hyperlinking facility is available.
8) Independed work can be done and need not to worry about editing programs.
9) If something is not working, then finding error is easy in HTML.
10) HTML will not cost anything for its use. There are no expensive licenses to buy or
no upgrades to purchase.
10) Learning HTML is simple than any programming language.

1..
Q.4 : Give the disadvantages of HTML.
Ans.: 1) HTML is not a programming language in true sense.
2) Any simple calculation cannot be done in HTML.
3) It cannot be used to display even date.
4) The interactive web pages cannot be built by HTML.
5) The web pages developed in HTML cannot behave like an application.
6) The web page developed in HTML do not have their own interface.
7) Hyperlink is provided in HTML. But for that we need a trip to sever at each step.
Q.5 : What is HTML ? Name any two softwares that are used for writing HTML codes. State
any one advantage and one disadvantage of HTML.
Ans.: Softwares that are used for writing HTML codes are :
1) Notepad in Windows
2) Simple Text in Macintosh
3) Pico in Unix
Q. 6 : What are the different types of browsers ?
Ans : These are the following types of browsers.
1) Microsoft Internet Explorer
2) Google Chrome
3) Mozilla Firefox
4) Microsoft Edge
5) Netscape Navigator
6) Safari
7) Opera
8) Konqueror
9) Lynx
Q.7 : What are tags ? Explain.
Ans. :
1) A tag is a single unit of mark-up. It is a set of symbols defined in HTML to have special
meaning. Tage are instructions that are written directly into text edition.
2) Tag start with a less than sign (<) followed by a keyword and end with greater than (>)
sign. These symbols together known as angle brackets.
3) The tag part is a code usually one or two letter, that specify the type of effect.
4) There are two types of tags in HTML :
i) Start tags ii) End tags
Start tags are used to begin an effect, and end tag are used to end that effect.
Name of end tag is same as that of start tag but the name of end tag preceded by a forward
slash (/).
5) For e.g. <I> is Italic tag. The text written between start tag <I> and end tag </I> will be
displayed in italic.
<I> HTML </I>
Here, the word ‘HTML’ will be displayed in italics.

2..
Q. 8 : Give the structure of HTML web page.
Ans. :
< HTML >
< HEAD >
< TITLE>
TITLE OF THE DOCUMENT
</TITLE>
< /HEAD >
< BODY >
ACTUAL DOCUMENT
< /BODY >
< /HTML >

Q. 9 : Explain the following tags.


Ans :
1) < HTML > :
1) This tag tell the browser the file is an HTML file.
2) This can be done by making the begining of the file with <HTML> tag and end with
</HTML> tag.
3) All other tags must reside within <HTML>.........</HTML> tag.
For Ex. <HTML>
<BODY>
This is HTML file
</body>
</HTML>
2) < HEAD > :
1) This tag defines the header area of the page.
2) This tag display the title of the web page on the title bar of the window.
For Ex. <HTML>
<HEAD>
<TITLE> First web page</TITLE>
</HEAD>
</HTML>

3) < TITLE > :


1) The actual name of the web page is enclosed in the title tag.
2) The text between <TITLE> ...... </TITLE > TAG is the title of web page.
3) The title should be descriptive a sit is frequently used by the web idexing and
searching programs.

4) < BODY > :


1) The actual content of the web page that will be displayed on browser is
enclosed in body tag.
2) There are several optional attributes for theis tag such as background images.
3) This tag starts with <BODY ad end with </BODY>.

3..
5) < P > :
i) It is used for creating paragraph text..
ii) The browser ignores the paragraph created by user while writing codes by pressing
“Enter”
iii) The <p> tag one optional attribute called align.
< p align=”left”> - Left alignment
< p align=”right:> - Right alignment
< p align=” center”> - Center alignment
< p align=”justify”> - Text justify to left and right margine.

6) < BR > :
i) This tag is used to insert line break.
ii) The text after <br> will be dispaled on next line in the browser.

Ex. Rajesh Pathare <br> 10, Central Line <br> New Delhi .

Output : Rajesh Pathare


10, Central Line
New Delhi .
iii) The <br> tag has no end tag.

7) < HR > :
i) This tag is also called as horizontal line.
ii) A web page can be divided into seperate section by using <hr> tag.

8) < PRE > :


i) It is used to preformat the text.
ii) The text enclosed with ina <pre> tag will be displayed in monospace form.
iii) This tag dispaly the text in exactly same manner as defined in HTML source
document.
Ex. : <pre> Ram Seema </pre>
Output : Ram Seema
9) < B> :
i) It is bold tag.
ii) The text enclosed within a <B> tag will be displayed in bold manner.

10) < I > :


i) It is italic tag.
ii) The text enclosed within a <I> tag will be displayed in italic.

11) < U > :


i) It is underline tag.
ii) The text enclosed within a <U> tag will be displayed as line will be appear at the
bottom of the text.
Ex. : <u> HTML </u>
Output : HTML

4..
12) < Marquee > :
i) The text enclosed within a <marquee> will be scroll on screen from right to left in
horizontal line.

13) < SUB > : Subscript tag.


i) The text enclosed within a <SUB> tag will be displayed in subscript manner.
Ex.: H<sub> 2 </sub> SO <sub> 4 </sub>
Output : H2SO4

14) < SUP > : Superscript tag.


i) The text enclosed within a <SUB> tag will be displayed in superscript manner.
Ex.: A<sup> 2 </sup> + B <sup> 4 </sup>
Output : A2+B2

15) < EM > : Emphasis tag.


i) The text enclosed with in a <EM> tag will be displayd in italics.

16) < STRONG > :


i) i) The text enclosed with in a <STRONG> tag will be displayd in bold manner.

17) < UL > : Unordered List.


i) An unordered list is list of items that have no perticular order or sequence.
ii) A special tag <LI> is usd with this tag.
Ex. : 1) <ul> Output
<li> Ram Ram
<li> Seema Seema
<li> Maya Maya
</ul>

2) <ul type=”disc”> Output


<li> Ram Ram
<li> Seema Seema
<li> Maya Maya
</ul>
3) <ul type =”circle”> Output
<li> Ram Ram
<li> Seema Seema
<li> Maya Maya
</ul>
4) <ul type =”square”> Output
<li> Ram Ram
<li> Seema Seema
<li> Maya Maya
</ul>

5..
18) < OL > : Ordered List.
i) An ordered list is list of items that have some perticular order or sequence.
ii) A special tag <LI> is usd with this tag.
Ex. : 1) <ol> Output
<li> Ram 1. Ram
<li> Seema 2. Seema
<li> Maya 3. Maya
</ol>

2) <ol type=”A”> Output


<li> Ram A Ram
<li> Seema B Seema
<li> Maya C Maya
</ol>

3) <ol type =”a”> Output


<li> Ram a Ram
<li> Seema b Seema
<li> Maya c Maya
<ol>

4) <ol type =”I”> Output


<li> Ram I Ram
<li> Seema II Seema
<li> Maya III Maya
</ol>

5) <ol type =”i”> Output


<li> Ram i Ram
<li> Seema ii Seema
<li> Maya iii Maya
</ol>

6) <ol start =”11”> Output


<li> Ram 11 Ram
<li> Seema 12 Seema
<li> Maya 13 Maya
</ol>

19) < STRIKE > :


i) The text enclosed within a <STRIKE> tag as a line will appear on the middle of the text.

Ex. : <strike> HTML </strike>

Output : HTML

6..
20) < BIG > :
This is a big tag. The text enclosed within this tag is displayed in larger font.

21) < SMALL > : This is small tag. The text enclosed within this tag is displayed in smaller font.

22) < CENTER > :


i) The text enclosed within a <CENTER> tag will be appear in the center of the web
page.

23) < IMG SRC > :


i) This tag is used to insert the image in the body of web page.

24) <HREF > :


i) The <HREF > attribute is used with <A> tag.
ii) HREF rafers Hypertext Reference.
iii) This tag establised a link to another document in another document.

25) < TABLE > :


i) A table can be created by <TABLE> tag.
ii) The row is to be defined first and then cell or columns are inserted into the row
from left to right.
iii) A row is inserted by using <TR> tag and cell is inserted by using <TH >and <TD>
tag.
iv) <TH> tag is used to defined the heading row of the table.
v) <TD> tag is used for displaying actual data in the table.

26) < CAPTION > :


i) This tag is used to create caption on the top or below the table.
ii) Caption tag displayed outside the table border.

27) < TR > :


i) It is table row tag.
ii) It create a horizontal row contains table heading or table data.
iii) A row can be inserted in the table by using <TR> tag.

28) < TH > :


i) It is a table heading tag.
ii) This tag is used to represent individual column heading of a table.
iii) By default text in this cell is bold and centered.

29) < TD > :


i) It is table data tag.
ii) It creates each individual cell.
iii) The number of cell in a row determines the number of columns.

7..
30) < DL > : Definition Language
Ex. <dl>
<dt> <b>Hardware</b><dd>Physical part of Computer.
<dt> <b> Software</b><dd> Information Stored inside the computer.
</dl>
Output :
Hardware
Physical part of Computer.
Software
Information Stored inside the computer.

31) < SELECT > :


i) Select one option from number of options.
Ex. :
<select>
<option> Seema
<option> Ram
<option> Maya
</select>

Seema
Seema
Ram
Maya

32) Colour Codes in HTML


1) Red - #FF0000
2) Blue - #0000FF
3) Green - #00FF00
4) Yellow - #FFFF00
5) Black - #000000
6) White - #FFFFFF

8..
Program no 1: Write HTML code for following output.
CRICKET ANALYSIS

COUNTRY PLAYED WON LOSE


INDIA 30 23 07
AUS 24 19 05
PAK 18 02 16
ZIM 10 07 03

< html>
<body>
<table bordrr=”2”>
<caption >CRICKET ANALYSIS </caption>
<tr>
<th> COUNTRY </th>
<th> PLAYED </th>
<th> WON </th>
<th> LOSS </th>
</tr>
<tr>
<td> INDIA </td>
<td> 30 </td>
<td> 23 </td>
<td> 07 </td>
</tr>
<tr>
<td> AUS </td>
<td> 24 </td>
<td> 19 </td>
<td> 05 </td>
</tr>
<tr>
<td> PAK </td>
<td> 18 </td>
<td> 02 </td>
<td> 16 </td>
</tr>
<tr>
<td> ZIM </td>
<td> 10 </td>
<td> 07 </td>
<td> 03 </td>
</tr>
</table>
</body>
</htm>

9..
Program no 2: Write HTML code for following output.
Yashwant college , Nanded
Course Capacity
B.Sc.(Comp) 80
B.Sc.(C.A.) 80
M.Sc.(Comp) 30
M.C.M. 40

<html>
<body>
<table border="2">
<tr>
<th colspan="2"> Yashwant college , Nanded </td>
</tr>
<tr>
<td> course </td>
<td> Capacity </td>
</tr>
<tr>
<td> B.Sc.(Comp) </td>
<td> 80</td>
</tr>
<tr>
<td> B.Sc.(C.A.) </td>
<td> 80</td>
</tr>
<tr>
<td> M.Sc.(Comp) </td>
<td> 30</td>
</tr>
<tr>
<td> M.C.M. </td>
<td> 40</td>
</tr>
</table>
</body>
</html>

10..
Program no 3: Write HTML code for following output.

Sr. No. Student Name Marks Obtained Total


Test 1 Test 2 Test 3
1 Maheshwari 150 150 150 450
2 Akansha 129 130 131 390
3 Asma 125 115 120 360

<html>
<body>
<table border="2">
<tr>
<th rowspan="2"> Sr. No.</th>
<th rowspan="2"> Student Name</th>
<th colspan="3"> Marks Obtained</th>
<th rowspan="2"> Total</th>
</tr>
<tr>
<th> Test 1 </th>
<th> Test 2 </th>
<th> Test 3 </th>
</tr>
<tr>
<td> 1 </td>
<td> Maheshwari </td>
<td> 150 </td>
<td> 150 </td>
<td> 150 </td>
<td> 450 </td>
</tr>
<tr>
<td> 2 </td>
<td> Akansha</td>
<td> 129 </td>
<td> 130 </td>
<td> 131 </td>
<td> 390 </td>
</tr>
<tr>
<td> 3 </td>
<td> Asma</td>
<td> 125 </td>
<td> 115 </td>
<td> 120 </td>
<td> 360 </td>
</tr>
</table>
</body>
</html> 11..
Program no 4: Write HTML code for following output.

YEAR
1998 1999 2000
Units 500 400 1000
Sales
Income 1000 800 2000

<html>
<body>
<table border="2">
<tr>
<th colspan="2" rowspan="2">
<th colspan="3"> YEAR </th>
</tr>
<tr>
<td> 1998</td>
<td> 1999</td>
<td> 2000</td>
</tr>
<tr>
<td rowspan="2"> Sales </td>
<td> Units</td>
<td> 500 </td>
<td> 400 </td>
<td> 1000 </td>
</tr>
<tr>
<td> Income </td>
<td> 1000</td>
<td> 800 </td>
<td> 2000 </td>
</tr>
</table>
</body>
</html>

12..
Program no 5: Write HTML code for following output.

Sunday Monday Tuesday

First Second Third

<html>
<body>
<table border="2">
<tr>
<td> Sunday</td>
<td> Monday</td>
<td> Tuesday</td>
</tr>
<tr>
<td >First</td>
<td> Second</td>
<td> Third </td>
</tr>
</table>
</body>
</html>

Program no 6: Write HTML code for following output.

<html> Ind 387 Yuvraj 138*


<body> Sehwag 83
<table border="2"> Eng 238 Peterson 58
<tr> Bopara 49
<td rowspan="2" > Ind 387</td>
IND win Ist ODI by 149
<td> Yuvraj 138*</td>
</tr>
<tr>
<td> Sehwag 83</td>
</tr>
<tr>
<td rowspan="2" > Eng 238</td>
<td> Peterson 58</td>
</tr>
<tr>
<td> Bopara 49</td>
</tr>
<tr>
<td colspan="2"> IND win Ist ODI by 149</td>
</tr>
</table>
</body>
</html>
13..
Program no 7: Write HTML code for following output.

SCIENCE
F.Y.B.Sc. S.Y.B.Sc. T.Y.B.Sc.
300 100 25
ARTS
F.Y.B.Com. S.Y.B.Com. T.Y.B.Com.
200 150 40
COMMERCE
F.Y.B.A. S.Y.B.A. T.Y.B.A.
300 100 25

<html>
<body> <tr>
<table border="2"> <th colspan="3" > COMMERCE </th>
<tr> </tr>
<th colspan="3" > SCIENCE </th> <tr>
</tr> <td> F.Y.B.A.</td>
<tr> <td> S.Y.B.A.</td>
<td> F.Y.B.Sc.</td> <td> T.Y.B.A.</td>
<td> S.Y.B.Sc.</td> </tr>
<td> T.Y.B.Sc.</td> <tr>
</tr> <td >300</td>
<tr> <td> 100</td>
<td >300</td> <td> 25 </td>
<td> 100</td> </tr>
<td> 25 </td> </table>
</tr> </body>
<tr> </html>
<th colspan="3" > ARTS </th>
</tr>
<tr>
<td> F.Y.B.Com.</td>
<td> S.Y.B.Com.</td>
<td> T.Y.B.Com.</td>
</tr>
<tr>
<td >200</td>
<td> 150</td>
<td> 40 </td>
</tr>

14..
MCQ’s
1) HTML stands for _________
a) Hyper Text Markup Language b) High Tech Manipulation Language
c) Hyper Text Manupulating Language d) High Text Markup Language.
Ans : a) Hyper Text Markup Language
2) The long form of SGML is
a) Standard Global Machine Language b) Special Global Markup Language
c) Symbolic Generalised Markup Language d) Standard Generalised Markup Language
Ans : d) Standard Generalised Markup Language
3) _______ tag is used for scroll the text.
a) <strike> b) <Marquee> c) <hr> d) None
Ans : b) <Marquee>
4) To place the image into an HTML file _____ attribute is used in IMG tag.
a) <URL> b) <SRC> c) <ALT> d) <HREF>
Ans :b) <SRC>
5) ________ is the name of web browser.
a) Embeded system b) Netscape Navigator
c) Oracle d) C++
Ans : b) Netscape Navigator
6) COLSPAN attribute is used with ______ tag.
a) <BODY> b) <HTML> c) <TITLE> d) <TABLE>
Ans : d) <TABLE>
7) <A> tag has attribute ______ which defines URL of the document to be linked.
a) SRC b) HREF c) VREF d) REF
Ans : b) HREF
8) In HTML ______ tag is used for superscript.
a) <S> b) <Super> c) <sup> d) <script>
Ans : c) <sup>
9) ALIGN is not an attribute used with ______tag.
a) <BODY> b) <HR> c) <TR> d) <TABLE>
Ans : a)<BODY>
10) In HTML ______ tag is used for subscript.
a) <S> b) <Super> c) <sub> d) <script>
Ans : c) <sub>
11) _______ is used to put horozontal line in HTML code.
a) <HR> b) <BR> c) <P> d) <TD>
Ans : a) <HR>
12) Border attribute is used in _______tag.
a) <HTML> b) <P> c) <TABLE> d) <TITLE>
Ans : c) <TABLE>
13) In HTML _____ is not a paired tag.
a) <B> b) <I> c) <BR> d) <TABLE>
Ans : c) <BR>
14) The valid attribute of <A> is ______
a) NAME b) SRC b) BGCOLOr d) HEIGHT
Ans : a) NAME

15..
15) The size of GIF format file is _____
a) Greater than BMP format file b) Less than BMP format file
c) Equal to BMP format file d) GReater than JPEG format file
Ans : b) Less than BMP format file
16) The attibute border in <TABLE> tag has the default value of _____
a) 0 b) 1 c) 2 d) None
Ans :b) 1
17) Bulleted list is created by ______ tag.
a) <LI> b) <OL> c) <B> d) <UL>
Ans : d) <UL>
18) HREF stands for _______
a) Horizontal reference b) Hypertext reference
c) Hyperlink reference d) Hypermedia reference
Ans : b) Hypertext reference
19) To display definition list on your web page ____tag is used.
a) <DLIST> <OL> c) <LI> d) <DL>
Ans : d) <DL>
20) URL stands for ___________
a) Uniform Resource Locator b) Unique Resource Locator
c) Uniform Resource Location d) None of these
Ans : a) Uniform Resource Locator
21) ISP stands for ________
a) Internal Service Provider b) Internet Service Provider
c) Information Servicee Provider d) None of these
Ans : b) Internet Service Provider
22) Name of the browser
a) Microsoft Internet Explorer b) Google Chrome
c) Mozilla Firefox d) Opera
d) Netscape Navigator
23) HTTP stands for
a) Hypertext Transfer Protocol b) Hyperrefernce Transfer Protocol
c) Hypertext Transfer Precaution d) None of these
Ans : a) Hypertext Transfer Protocol
24) The first page of website is called as _________.
a) Start Page b) Home Page c) Both d) None
Ans : b) Home Page
25) FTP stands for _______.
a) File Trasfer Protocol b) File Transfer Protection
c) Both d) None
Ans : a) File Trasfer Protocol
26) CGI stands for ________.
a) Common Gateway Interface b) Common General Interface
c) Both d) None
Ans : a) Common Gateway Interface
27) JPEG stands for ________.
a) Joint Photographic Expert Group b) Joint Photo Expert Group
c) Both d) None
Ans : a) Joint Photographic Expert Group
16..
28) IP stands for _________.
a) Internet Protocol b) Instant Protocol
c) Internet Protection d) None
Ans : a) Internet Protocol
29) XML stands for __________.
a) External Markup Language b) Extended Markup Language
c) Expension Markup Language d) None
Ans : b) Extended Markup Language
30) MPEG stands for ___________.
a) Motion Picture Expert Group b) Moving Picture Expert Group
c) Both d) None
Ans : c) Both
31) PPP stands for ________
a) Point to Point Protocol b) Peer to Peer Protocol
c) Both d) None
Ans : a) Point to Point Protocol
32) SLIP stands for _______
a) Special Line Internet Protocol b) Serial Line Internet Protocol
c) Both d) None
Ans : b) Serial Line Internet Protocol
33) E-mail stansds for ________.
a) Electronic mail b) electric mail
c) Both d) Non
Ans : a) Electronic mail
34) Three basic elements of e-mail.
a) Header b) Messege c) Signhature
35) IM stands for ______
a) Instant messaging b) Internet messeging
c) Both d) None
Ans : a) Instant messaging
36) EDI stands for ________
a) Electronic Data Interchange b) Electric Data Interchange
c) Both d) None
Ans : a) Electronic Data Interchange
37) DHTML stands for ______________
a) Digital Hypertext Markup Language b) Dynamic Hypertext Markup Language
c) Both d) None
Ans : b) Dynamic Hypertext Markup Language
38) FAQ stands for _________
a) Frequently Asked Question b) Fresh Asked Question
c) Both d) none
Ans : a) Frequently Asked Question
39) IRC stands for _________
a) Instant Relay Chat b) Internet Relay Chat c) Both d) None
Ans : a) Instant Relay Chat
40) www stands for ________
a) World Wide Web b) Wide Web World c) Web World wide d) Nobe
Ans : a) World Wide Web
17..

You might also like