Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
learn html
What is HTML?
HTML stands for 'hyper text mark-up language' and is a simple language that
anyone can learn and is used for making web pages.
What tools are needed to make a webpage?
<HTML>
<HEAD>
<TITLE>my first web page</TITLE>
</HEAD>
<BODY>
</body>
</HTML>
Output:-
This is my very first webpage, aint i clever?
What is Web Page
Web page is a page which is displayed on the internet. Web pages are
created by using HTML syntax. In web pages we can insert the
picture ,table , graphics by using different tags of html language.
HTML TAGS
<HTML>……..</Html>
<Head>……..</Head>
<Body>……..</Body>
Unpadded tags:- unpadded
tags is just the opposite of
Padded Tags, as they need not
be closed at the end.
<HR>
<BR>
Layout of Web Page
Title
Headin
g
Bod
y
Footer
Basic Tags:-
<HTML>….……..</HTML>
<TITLE>…………</TITLE>
<HEAD>………..</HEAD>
<BODY>…………</BODY>
BASIC TAGS
Tags Description
Title My page
Output:-
This is heading 1
The heading above is aligned to the center of this page. The
heading above is aligned to the center of this page. The
heading above is aligned to the center of this page.
Note:- to make your text in center of page you can also use
the option (tag) <center> simply.
Use of horizontal line in HTML
<html>
<body>
<p>The hr tag defines a horizontal rule:</p>
<hr />
<p>This is a paragraph</p><hr />
<p>This is a paragraph</p><hr />
<p>This is a paragraph</p>
</body></html>
Output:
The hr tag defines a horizontal rule:
This is a paragraph
This is a paragraph
This is a paragraph
Format Tags Description
Character <I>….</I> Indicates italics
<U>…..</U> Underlines the text
<B>……</B> Indicates bold text
<TT>……</TT> Indicates “typewriter” font
<EM>……</EM> Emphasizes the text (usually italics)
<ADDRESS>….</ADDR Indicates information about the
ESS> author who created the web
page in a unique font.
<STRONG>…….</STRO Indicates typical Bold Font
NG>
<CITE>………</CITE> Highlights Citation
<CODE>…….</CODE> Used to enclose program codes
<abbre > Title=“……..” It is used as abbreviation of full
text.
<html>
<body>
<p>This is a paragraph. we are using this option to display the result of this
option on the web page </p>
<p>This is a paragraph. we are using this option to display the result of this
option on the web page </p>
<p>This is a paragraph. we are using this option to display the result of this
option on the web page </p>
</body>
</html>
Output:-
This is a paragraph. we are using this option to display
the result of this option on the web page
<html>
<body>
<abbr title="United Nations">UN</abbr>
<br />
<acronym title="World Wide Web">WWW</acronym>
<p>The title attribute is used to show the spelled-out version when
holding the mouse pointer over the acronym or
abbreviation.</p>
</body>
</html>
Output of abbreviation tag
UN
WWW
The title attribute is used to show the spelled-out version when
holding the mouse pointer over the acronym or abbreviation.
<html>
<body>
<p>
If your browser supports bi-directional override (bdo), the
next line will be written from the right to the left (rtl):
</p>
<bdo dir="rtl">
Here is some Hebrew text
</bdo>
</body>
</html>
Output
<html>
<body>
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>
</body></html>
Output:-
This is heading 1
This is heading 2
This is heading 3
This is heading 4
This is heading 5
This is heading 6
Tag Attribute Function
<! ………> Indicates comment tag
in Html. The browser
does not interpret it.
<body> Bgcolor=“……” It is used to give the
background color of
the page
Background=“ It is used to display the
…” image on the page as
a background
These tags are used in body tag.
<Sub>…...</Su It is used to show text in
b> subscript form
<Sup>…..</Su It is used to show text in
p> superscript form
Use of background tags/attributes
<html>
<body style="background-color:orange">
<h2>Look: Colored Background!</h2>
</body>
</html>
Output:-
Output:-
<li> Chandigarh
<li> Ropar
<li>Patiala </ol>
<li> Patiala</ol>
Types of Links:-
Internal links
External links
Tags for hyperlinks
It is used when Document is too large and it needs link from Top
to Bottom or Bottom to Top.
Syntax
<Html>
<Body>
<a name=“a1”>
<a href=“#a2”> Bottom </a>
This is a document which shows the link with in a page. All the text is
used to show link of top text with bottom text.
<a href=“#a1”> Top </a>
<a name=“a2”>
</body></html>
Table
1 2 3
4 5 6
7 8 9
Rows and column span
<html><title>
Row span in table </title>
<table border=12 bordercolor=“brown” align=left>
<tr><td Colspan=2>1
<td>3</tr>
<tr><td >4<td Rowspan=2>5<td>6</tr>
<tr> <td>7<td Bgcolor=“pink”>8 </tr>
</table></html>
Row span in table
1 3
4 5 6
7 8
Forms in HTML
Forms are basically used for
registration detail that the user
may have to enter in the form.
Tag Attribute function
<form>..</for Indicates the beginning and
m> end of a form in HTML
Action=file/URL Specifies the location where
form data is passed.
Method=get/p Specifies the method by
ost which the data is sent to the
server.
Name=“……’ Name assigned to the form
which is not displayed on the
browser.
Forms
Output:-
Type your first name:
Type your last name:
Submit
If you click the "Submit" button, you will send your input to a new page
called html_form_action.asp.
<html>
<body>
<fieldset text=“red”><legend>
Health information:
</legend>
<form action="">
Height <input type="text" size="3">
Weight <input type="text" size="3">
</form></fieldset>
<p> If there is no border around the input form, your browser is too old.</p>
</body>
</html>
Output:-
Health information:
Height Weight
If there is no border around the input form, your browser is too old.
Important tags of form
Output
How it looks in a browser:
I have a bike:
I have a car:
I have an airplane:
Radio buttons
Output:-
Frames divide the web page into different section like in rows and
columns.
Frame tags
Note:- to insert frames do not use the head and body tags, as
you need to divide the entire document window into frames that
open different html files.
Frame tag (vertical frames)
<html>
<frameset cols="25%,50%,25%">
<frame src="frame_a.htm">
<frame src="frame_b.htm">
<frame src="frame_c.htm">
</frameset>
</html>
Horizontal frames
<html>
<frameset rows="25%,50%,25%">
<frame src="frame_a.htm">
<frame src="frame_b.htm">
<frame src="frame_c.htm">
</frameset>
</html>
<html>
<frameset cols="25%,50%,25%">
<frame src="frame_a.htm">
<frame src="frame_b.htm">
<frame src="frame_c.htm">
<noframes>
<body>Your browser does not handle frames!</body>
</noframes>
</frameset>
</html>
Rows and column in frame.
<html>
<frameset rows="50%,50%">
<frame src="frame_a.htm">
<frameset cols="25%,75%">
<frame src="frame_b.htm">
<frame src="frame_c.htm">
</frameset>
</frameset>
</html>
<html>
<body>
<iframe src="default.asp"></iframe>
<p>Some older browsers don't support iframes.</p>
<p>If they don't, the iframe will not be visible.</p>
</body>
</html>
Some older browsers don't support iframes.
If they don't, the iframe will not be visible.