You are on page 1of 15

WRITTEN BY MR.

ANUJ KUMAR

Web Notes
[Type the document subtitle]
Windows User

2018

CAREER TECH ACADEMY ,PATRIKA CHAURAHA , ALLAHABAD


25 March 2018 Page |2

About HTML:- html is devolved by Tim burners-Lee in 1990, html is sort form of Hypertext mark up
language . html is used to create electronic document (webpage) that are display on the www(word wide web).

Each page content a series of connection to other pages called hyperlink . every web page you see on the
internet is retain using html code.

Structure of web page :- There are basic two section of each web page as like –

(1) Head Section (2) Body Section

Head section :- Title bar , menu bar , Address bar , Tool Bar .

Body section :- Text , Background color , picture , list etc .

Example:- <html>

<head>
<\head>
This is tag – command
<body>
fo”ks’k izdkj ds work dks gh tag dgk
<\body>
tkrk gS A

<\html>
Element of html :- There are basic element of html (i) Tag (ii) Attribute
Tag :- Tag is command of html that is used for perform specific task . It is always closed with (< >) bracket .
Note :- Tag type tag (1) Container (2) Empty .
Attribute :- Attribute is additional sub cutes information / Description of related tag .

<html> :- It is first tag of web page that enter dues web page designing it start it is container tag
Because html tag always closed <\html>.
<Br> :- Br tag is a empty tag because it is start but don’t closed . it is used for break/ change line in to html .
<head> :- It is used for head section for any html document head tag includes title of documents , styles , scripts and
other Miata information of the web page .

Syntax :- <head>
_________
Head tag :- Title bar , Tool bar , Menu Bar , Address
_________
bar
<\head>
Miata information .
<title> :- the title tag recvayerd is all the html document that is define title of the document .

Syntax :- <title >


Name of document

2|Page
25 March 2018 Page |3

<\title>
Q.1. Write a html code for title of web page .
Ans. <html>
<head>
<title>
Career Tech Academy
<\title>
<\head>
<\html>

<body> :- the body tag is define the document area that include text, picture , hyperlink , table , form and list etc.
There are following attribute of body tag .
1. Back ground
2. Bg color
3. Text

Note:- Attribute mins additional information of related tag .

Syntax :- <body Bg color =value background = value Text = value >

___________________

___________________

<\body>

Q.2. Write a html code for insert a image in back ground of document .

Ans. <html>

<body background = “C:\CTA\xyz.jpg”>1

<\body>

<\html>

<p> :- It is paragraph tag that is used for writing a paragraph in html document there is one attribute of <p> is
align.

Syntax :- <p align= value>

__________________

_________________

<\p>

Q.3. Write a html code for writing 5 line paragraph with red color in yellow background .

Ans. <html>

<body bg =color= “yellow” text = “red”>

1 Computer Path
3|Page
25 March 2018 Page |4

<p>

This is a boy <br>

That is dog <br>

Ram is good boy <br>

Ramesh is good man <br>

Kamal is lovely boy <\body>

<\html>

<font> :- the font tag is used for set the font name font size and fond color of the selected text in html document.

Syntax:- <font face =value color =value size =value >

___________

____________

<\font >

Q.4. Write a html code for right to 10 line paragraph with five line blue and five line is green .

Ans. <html>

<body>

<p>

<font color=”blue”>

Anuj is good boy

</font>

</p>

<p> <font color=”Green”>

Ramesh is good boy

</p>

</body>

</html>

Q.5. Write a html code for 10 line paragraph with five line red color and monotype cursive face 14 size
and rest five line with Times new Roman face .

Ans. <html>

<body>
4|Page
25 March 2018 Page |5

<p>

<font face=”monotype cursive|” color=”red” size=+2>

How are you

</font face =”Times New Roman”>

Your lovely son

</font>

</p>

</body>

</html>

<marquee> :- marquee tag is used for scrolling the piece of text or image in thee html document .

There are basic following attribute of <marquee> such as .

(1) Behavior 1 (2) bg color (3) Direction2 (4) Scroll delay

Syntax :- <marquee>

Text/image

</marquee>

Example :- <html>

<body>

<p>

<marquee direction = “right” behavior =”Alternative “ >

How are you

</p>

</body>

</html>

<Sub> :- Sub tag is font elect tag that is used for subscript (basic line text of regular text) of the selected text.

Syntax:- <sub> text </sub>

Q.6. Write a html code form following output.

1
(i) Alternative (ii) Slide (iii) Scroll

2
(i) Left (ii) Right (iii) up (iv) down
5|Page
25 March 2018 Page |6

H2SO4

Ans. <html>

<body>

<p>

H<sub>2</sub> SO<sub>4</sub>

</p>

</body>

</html>

<sup> It also font elect tag that is used for above line text of regular text (superscript) in html document .

Syntax:- <sup> Text</sup>

Exe. Write a html code for following output .

x2+y2+2xy=0

Ans. <html>

<body>

<p> x<sup>2</sup>+y<sup>2</sup>+2xy=0

</p>

</body>

</html>

<B>,<U>,<I> :- These tag is used for respective bold of selected text , underline of selected text and Italic of
selected text in html document.

Syntax:- Bold Italic Underline

<b> <I> <u>

Text text text

</b> </I> </u>

Example :- Write a html code of following output .

Ans. <html>

<body>

<p>

<b> This is a boy</b>

</p>
6|Page
25 March 2018 Page |7

</body </html>

Note:- Same example as like Italic and underline .

List :- In html to create numbering and bullets using list . There are basic two type of list create in a html document .

(1) Order list ( Numbered list )


(2) Unordered list (bullets list )

Order list :- Its is create by <ol> and type , start is attribute of this tag .

Syntax :- <ol typen = value start =value>

<li> type text </li>

</ol>

Example :- <html>

<body>

<p> loving device </p>

<ol>

<li> Anuj is good Boy </li>

<li> In Living to Allahabad </li>

<li> Anuj study is very hard </li>

</ol> </body> </html>

Q. Write a html code for following output .

1. Moniter
2. Printer
A. Imfact
B. Non Imfact
3. Speker

Ans. <html>

<body>

<ol>

<li> Moniter </li>

<li> Printer</li>

<ol type= A Start=A >

<li> Imfact </li>

<li> No imfact</li>

7|Page
25 March 2018 Page |8

</ol>

<li> Speaker</li>

</ol>

</body> </html>

Unordered List :- To create bullets( unordered list ) using <ul> and type one attribute <ul>

Only thre type used to unordered list in html.

1. Disc 2. Circle 3. square .

Syntax :- <ul type =value>

<li>

Text

</li>

</ul>

Q. Write code for following output .

Input device

1. Keyboard
 Normal Keyboard
 Multi media keyboard
2. Mouse
3. Scanner
o Flat bed scanner
o Drum
4. Joystick

A.Track ball

Ans. <html> <body> <p> <h1> Input device </h1></p>

<ol><li> keyboard

<ul type= circle> <li> Normal</li> <li> Multi media keyboard</li></ul>

<li> Mouse

<li> Scanner

<ul type = disc><li> flat bed<li> drum</li></ul>

<li> Joystick</li></ol>

<ol type =A start =A> <li> track ball</li></ol>

</body>

8|Page
25 March 2018 Page |9

</html>

<Heading> :- heading us used for heading (bold) in html document heading is created in html document using <h1> to
<h6> .

Syantax :- <h1> text </h1>

<img> In html document to insert a image by using <img> .

Brower support the jpg . bmp and gif file format . and there attribute is .

Attribute :-( src, align , border, height, breath, alt, etc.)

Note :- Alt is work in to html when missing picture your computer .

Example :- <html>

<body>

<marquee behavior = scroll direction =right>

<img src=”path” height =”100” breadth = “100” alt=”missing”>

</img>

</margue> </body></html>

Table:- Table is combination of row and column in html , to create a table by using table tag there are

Following sub tag used with table tag . There are following attribute in table tag .

<table> Attribute:- ( Cellspecing, celpadding ,border, bordercolor, bgcolor,.)

<td>/<th> attribute:- ( collspan, rowspan, Align, bgcolor, width )

1. <tr> (row)
2. <th> (heading) default (bold,center)
3. <td> (column) default(regular , left)

Example :- <html><body>

<table border=11 bordercolor =blue cellpadding=10 cellspecing=10>

<tr><th>S.l. No.

<th>father name

<th>mother name</th></tr>

</table>

</body>

</html>

Q. Write a html code for following output.

9|Page
25 March 2018 P a g e | 10

Ans. <html>

<body> <table border=”1” bordercolor= back cellpadding=20 cellspecing=20>

<tr><td colspan=2>&nbsp;</td></tr>

<tr> <td>&nbsp;<td>&nbsp;</td></tr>

</table>

</body></html>

Q. Write a html code for following output.

Ans. <html>

<html>

<body> <table border=”1” bordercolor= back cellpadding=20 cellspecing=20>

<tr><td rowspan=2><td>&nbsp;</td></tr>

<tr> <td>&nbsp;</td></tr>

</table>

</body></html>

Q. Write a html code for following output.

Ans. <html>

<body> <table border=”1” bordercolor= back cellpadding=20 cellspecing=20>

<tr><td>&nbsp; <td>&nbsp;</td></tr>

<tr> <td colspan=2>&nbsp;</td></tr>

</table>

</body></html>

Q. Write a html code for following output.

Ans. <html>

10 | P a g e
25 March 2018 P a g e | 11

<body> <table border=”1” bordercolor= back cellpadding=20 cellspecing=20>

<tr><td>&nbsp;<td rowspan=2>&nbsp;</td></tr>

<tr><td>&nbsp;</td></tr>

</table>

</body></html>

<form>:- form is also known as web form that iss uses form input information to web page and stor for future
uses . the basic element of form tag as.

1. Text box
2. Option button
3. Ckeck box
4. Command button
5. Combo box
6. List box
7. Text Area etc

<Input tag> by using input tag , we can create text box, ckeck box, radio button ,

Password , text box, submit button and reset button , There are following attribute of input tag.

(1) Type (2) value (3) size (4) name (5) max length etc.

Q. Write a html code for text box.

<html>

<body bgcolor=grey>

<form>

Your name:- <input type =text></input></form></body></html>

Q. Write a html code passwordtext box.

<html>

<body bgcolor=grey>

<form>

Your password:- <input type =password></input></form></body></html>

Q. Write a html code for check box.

<html>

<body bgcolor=grey>

<form>

Tick:- <input type =checkbox></input></form></body></html>

11 | P a g e
25 March 2018 P a g e | 12

Q. Write a html code for radio button.

<html>

<body bgcolor=grey>

<form>

Option:- <input type =radio name=A>Male

<input type =radio name=A>Female</</input></form></body></htm

Q. Write a html code for combo box?

<html><body bgcolor="grey"><form>Country:- <select><option>Indian<br>

<option>Pakistan<br>

<option>America<br>

<option>Austelia</option></select></form></body></html>

Q. Write a html code for list box.

<html><body bgcolor="grey"><form>Country:- <select size=”3”><option>Indian<br>

<option>Pakistan<br>

<option>America<br>

<option>Austelia</option></select></form></body></html>

Q. Write a html code for following output .

<html><head></head>

<body><h1> Login windows</h1>

<table><tr><td>User Name<td> <input type="text"></input> </td></tr><tr>

<td>Password <td><input type="password"></input></td></tr>

<tr>

<td>

<td align="right">

<input type="button" value="Sign"></input>

<input type="button" value="Cancel"</input>

</td></tr></table></body></html>

Q. Write a html code command button .

<html>

<body>

12 | P a g e
25 March 2018 P a g e | 13

<form>

<input type =”button” value =”sign up”>

</input >

</form></body></html>

Q. Write a html code for text area.

<html>

<body bgcolor="red">

<form >

About US<br><textarea rows=4 cols=100 > </textarea>

</form>

</body></html>

Q. Write a html code for button.

<html>

<body>

<form> Name :- <input type= "Text"> </input>

<input type ="button" value ="Reset"></input>

</form></body></html>

Q. Write a java script code for following current date of system?

<html><head><script>

function abc()

alert (date());

}</script></head>

<body><form>

<input type="button" value="Today Date" Onclick="abc()"> </input></form>

</body>

</html>

Q. Write a java script code for square of a number? Example.

Ans. <html>

<head>

<script>

13 | P a g e
25 March 2018 P a g e | 14

</script>

</head>

<body>

<form name=”f1”> input Number <input type=”text” name=”t1” > </input>

<input type=”button” value =”square” onclick=”fun()”> </input>

</form>

</body>

</html>

Q. Write a java script code for display current date of system ?

Ans. <html>

<head><script>

Function dun()

f1.t1.value=date();

}</script></head>

<body>

<form name=”f1”>

<input type=”text” name=”t1” readonly> </input >

<input type=”button” onclick=”fun()”></input>

</form>

</body>

</html>

14 | P a g e
25 March 2018 P a g e | 15

15 | P a g e

You might also like