0% found this document useful (0 votes)
8 views26 pages

HTML Project

The document provides an overview of the internet, its features, applications, and uses, as well as an introduction to HTML, CSS, and JavaScript. It details the evolution of HTML, its elements and tags, and includes examples of various HTML programs for formatting, lists, tables, and hyperlinks. Additionally, it covers identifiers and operators in JavaScript, emphasizing the language's role in creating dynamic web pages.

Uploaded by

sukhchainkkaur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views26 pages

HTML Project

The document provides an overview of the internet, its features, applications, and uses, as well as an introduction to HTML, CSS, and JavaScript. It details the evolution of HTML, its elements and tags, and includes examples of various HTML programs for formatting, lists, tables, and hyperlinks. Additionally, it covers identifiers and operators in JavaScript, emphasizing the language's role in creating dynamic web pages.

Uploaded by

sukhchainkkaur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 26

What is internet ?

The internet sometimes called simply “the net” is a worldwide


system of computer networks – a network of networks in which
users at any one computer can if they can get information from any
other computer.

It was conceived by the Advance Research Projects Agency (APRA)


of the US Government in 1969 and was known as the ARPANET. The
original aim was to create a network that would allow users of a
research computer at one university to “talk to” research computer
at other universities. A side benefit of APRA Net’s was that because
message could be routed or rerouted in more than one direction the
network could continue to function even if parts of it we destroyed
in the event of a military attack or other disaster.

Today the network is a public, cooperative and self-sustaining


facility accessible to hundreds of millions of people worldwide . It is
used by many as the primary source of information consumption
and failed the creation and growth of its own social ecosystem
through social media and content sharing, furthermore, e-
commerce or online shopping has become one of the largest uses of
the internet.

Write down the features of internet ?


Features of internet are ---

Accessibility

Flexibility

Easy to use

Security

Low cost

Extension of exiting IT technology


Interaction with other media

What are internet applications and its types ?


The internet has many important internet applications of the various service
available by the internet.

The three most important internet applications are following :-

E-mail

Web browsing

Peer to peer services.

E-mail - E-mail is a service which allows us to send the message in electronic


mode over internet . It offer an efficient, inexpensive and real time of
distribution information among people.

Web-browsing- The web browser is another internet applications of critical


importance. At the act of looking through a set of information quickly without a
specific sense of purpose.

Peer to Peer services – One of the fastest growing most contro versinal and
potencially most important areas of internet applications is peer to peer(P2P)
networking.

P2P is based on the sharing of physical cycles and individual files. Among
computer and other intelligent devices unlike client server networking. Where
some computers are dedicated to serve other system, each computer in peer to
peer networking has equillent capabilities and responsibilities.

Internet based peer to peer applications position the desktop at the centre of a
computing matrix usually on the basis of cross network protocols such as XML-
RPS.

Thus enabling users to participate in the internet more interactively.

Internet application can be described as type of applications that use for


operating successfully. That is by using the internet for fetching, sharing and
displaying the information from the respective server system.

Write uses of internet ?


We can search for anything on the internet .
The internet also provide a good source of entertainment .for ex- music ,movies ,comedy,etc.
Internet is a medium of free of cost –effective communication.
E-commerce has brought the shoping on your fingerhips and delivery at your doorsteps
Video conferencing is one of the best way of use of internet
The internet is a medium of advertise ment owing to its vast reach
The job protals have made the job-hunting an easy process which has helped millions of youth
Social networking sites like facebook , twitter and linkedin etc are the best way of connecting people
Internet is the best tuitor for the underprivileged who can’t afford higher eduction

Introduction on html .
Htlm is a very evolving markup language and has evoled with various versions
updating long before is revised standards and specification are carried in each
versions has allowed its user to creat web pages is the much sites very efficient .
.html i.o was released in 1993 with the intention of sharing information which
can be readable and accessible via web browser .but not much of the developes
were involed in creating websites so the language was not grown.

. html 2.0 was published in 1995 which contains all features of htl 1.0 along with
new additionl features which reaind as the standard markup language for
designing and create websites until January 1997 and refind various core
feature of html.

.html 3.0 include improved new feature of html give more powerful
characteristics for web masters in design web pages .but these powerful feature
of new htlm slow down the browser in applying further improvement .

. html 4.0 is a successful version of html before html 5.0 which is currently
released and used world wide html 5 can be said of an extended version of html
4.0 which is published in 2012.

Html elements and tags.


Html elements:- The html elements is everything from the start tag to the end
tag.

<tagname>content goes here…..</tagname>

Basic elements of HTML page are.

A text header denoted using the <h1>,<h2>,<h3>,<h4>,<h5>,<h6>

<p>use to denote paragraph element.

<br>this is cally empty element.

<html>is the root element and it defines the whole HTML element
and tags.
An Html element and tag is defined by a start tag some content and end
on tag.

<!DOCKTYPE Html>

<html>

<head>

<title>page title</title>

</head>

<body>

<h1> my first heading </h1>

<p> my first paragraph </p>

</body>

</html>

Output:

my first heading
my first paragraph

Html page structure:


The html page structure has divided into two parts:-

Head part

Body part

Head part:- The title and metadata of a web document are contained in
the head elements.

Body part:- The body element include the information that you wish to
display on a web page. To make your web pages html 4 compatible
include a document type declaration before the html element.

The basic structure contain 5 elements:-

<!Doctype>

<html>

<head>

<title>

<body>
Features of html.
Features of html are following:-

It is easy to learn and use.

It is plateform independent.

Image, audios and videos can be added to a web page.

Hypertext can be added to the text.

It is a markup language.

Html provides pre defined tags.

Html tags also help in the SEO(search engine optimization) of


website.
Html font size and attributes.
All html elements can have attributes.

Attribiutes provide additional information about elements.

Attribute are always specified in the start tag.

Attribute usually come in name/value pairs like: name=”value”.

Href attribute:-

The <a> tag define a hyper link, the href attribute specifies the URL of
the page in the link.

For example

<a href="https://www.w3schools.com">Visit W3Schools</a>

Src attribute:-

The <img> tag used to imbed an image in a HTML page. The src
attribute specifies the path of image to be displayed.

For example

<img src="img_girl.jpg">

Alt attribute:-

The alt attribute is used in the <img> tag for an alternate text for an
image. If the image for some reason cannot be displayed this can be due
to slow connection,or an error in the src attribute.
Style attribute:-

The style attribute is used to add style to anelement such as colour, font
size and more.

Font size in html:-

The font size property set the size of the text. Being able to manage the
text size is important in web-design. The font size value can be absolute
or relative size.

Relative size sets the size relative to surrounding elements and allow
users to change the text size in browsers.

Write a program using the font size property.


<!Doctype html>

<html>

<body>

<h1 style="font-size:30px;"> this is a heading</h1>

</body>

</html>

output

this is a heading

Background colour in html.


The attribute that is used to set background color of an html element is
style attribute.
Depending on the element whose background colour is to be set we use
the appropriate tag.

Write a program to change background colour.


<!Doctype.html>

<html>

<body style="background-color:powder blue:">

<h1> this is a heading </h1>

</body>

</html>

Output

this is a heading
Write a program using background image on html.
<!Doctype html>

<html>

<head>

<style>

body

background_image:url('img_p.jpg');

</style>

</head>

<body>

<h2> background image </h2>

<p> by default, the background image will repeate itself if it is smaller then the element
where it is specified in this case the body element </p>

</body>
</html>

Output

background image

by default, the background image will repeate itself if it is smaller then the element
where it is specified in this case the body element

Write a program to use text formatting in html.


Html contains several text formatting elements to define text with a

special eaning.

Program of text formatting by using formatting elements of html are follows:-

<!Doctype html>

<html>

<body>

<p><b> this text is bold </b></p>

<p><i> this text is italic </i></p>

<p> this is <sub> subscript </sub> and <sup> supscript </sup></p>


<p> do not forget to buy <mark> keyboard </mark> today </p>

</body>

</html>

Output

this text is bold

this text is italic

this is subscript and supscript

do not forget to buy keyboard today

Write a program to insert image in html.

<!Doctype html>

<html>

<body>

<h2> insert a image </h2>

<p> this is common to store image in sub-folder and insert on html. you must then
include folder name in syntax </p>

<img src="/image/html5.jyg">

</body>

</html>

Output
insert a image

this is common to store image in sub-folder and insert on html. you must

then include folder name in syntax

Write a program to use of hyperlinks.

<!Doctype html>

<html>

<body>

<h1> HTML HYPERLINK </h1>

<p> <a href="www.google.com!"> visit Google!</a></p>

</body>

</html>

Output

HTML HYPERLINK
visit Google!
Write a program for div tag.

<!DOCTYPE HTML>

<html>

<style>

div

background color:red;

</style>

<body>

<h1> HTML. DIV </h1>

<div>

<h2>london</h2>

<p> london is the capital city of england </p>

</div>

</body>

</html>

Output

HTML. DIV
london
london is the capital city of england

Write a program using list tag.

<!DOCTYPE HTML>

<html>

<body>

<h2> html list </h2>

<ul>

<li> coffee </li>

<li> tea </li>

</ul>

</body>

</html>

Output

html list

coffee

tea
Write a program using table tag.

<!DOCTYPE HTML>

<html>

<head>

<style>

table { font-family:arial; border-collapse:collapse;width:100%;}

td,th {border:1px solid gray;text-align:left;padding:8px}

tr:nth child(even){background-color:solid gray;}

</style>

</head>

<body>

<h2> table </h2>

<table>

<tr> <th> company </th>

<th> contact </th>

<th> country </th>

</tr>

<tr><td> boat </td>

<td> deep </td>

<td> india </td> </tr>

<tr> <td> flevaro </td>


<td> sukh </td>

<td> america </td> </tr>

<tr><td> s.s.s </td>

<td> nirmal </td>

<td> Sri Ganganagar(Raj.)</td> </tr>

</table>

</body>

</html>

table
Company contact Country
Boat deep India
Flevaro sukh America
s.s.s nirmal Sri
Ganganagar(Raj.)

HTML links.

Html links are hyperlinks. You can click on a like and jump to another document. When
you move the mouse over a link the mouse arrow will turn into a little hand (note:- a
link does not have to be text) a link can be an image or any element.

Syntax:- <a href=”url”> link text</a>

The most important attribute of the <a> element is the href which indicate link
description. The link text is the part that will be visible to reader.

By default link in all browser

A unvisited link underlined and blue.


A visited link underlined and purple.

A active link underlined and red.

In html link there are many other link attribute like target attribute, etc.

List and its types.

List:- html list allows web developers to group a set of related items in lists. <to> it is
list tag.

Types of list:-there ate three types of lists—

Ordered list

Underlined list

Description list.

Ordered list:- an ordered list start with <ol> tag. Each list item
start with the <li> tag. In ordered list, they are marked with
numbers, alphabets, roman numbers.

For example an ordered list-

first item

second item

third item

Unordered list:- an unordered list starts with the <ul> tag. These
list items will be marked with sullets.
For example an unordered list-

tea

coffee

milk

Description list:- a description list is a list of a each term. Te <dl>


tag defined description list, the <dt> tag defines the term (name),
and the <dd> tag describe each term.

For example-

Coffee

Black not drink.

Html frame tag.

In html 4, frame tag was used. It is used to divide the browsers window into multiple
sections called “frames” where each section can load separate html pages.

A collection of frames in browsers is called a frameset. Frame tag is not supported in


html 5 and it is not recommended to use it.

Syntax: <frame src=”url”>

Html file using tag.


Html file tag is used to upload any file to the server. You find many times on a web page
that a form gives you an option to upload any file like your resume etc. to the server.
This is possible to file tag.

With the use of file tag, user can upload his file in the form. It is done through <input>
tag.

Syntax: <form>

<input type=file value=”u.f”>

</form>

( UF= upload file)

What is CSS ?

CSS stand for cascading style sheets.

CSS describes how HTML elements are to be displayed on screen, paper


or in other media.

CSS save a lot of work. It can control the layout of multiple web pages all
at once.

External style sheets are stored in CSS files.

Introduction to java script.

Javascript is an object-based scripting language which is lightweight and cross platform.


It is used to create client side dynamic pages. It is an interpreted, fullfledged
programming language that enables dynamic interactivity on websites . when applied
to an HTML document.

It was introduced in the year 1995 for adding programs to the webpages in the
netscape navigator browser. With javascript, users can build modern web applications
to interact directly without reloading the page every time. The traditional website uses
JS to provide several forms of interactivity and simplicity.

Client side JS extend the core language by suoolying obects to control a


browser and dom.

For example- client side extensions allow an application to place elements on an


html form and respond to user events such as mouse clicks, form input and page
navigation.

Server side JS extends the core language by supplying objects


relevant to running

JS on a server.

What are identifier in Javascript ?

An identifier is a name given to entities like variables, functions, class etc.

Rules for writing identifiers sign:-

Identifiers must start with either a letter an underscore or the dollor


sign.

Identifiers name cannot start with numbers.

It is case sensitive.

Keywords cannot be used as identifier names.

What are operators in JS.

Javascript operators operate the operands, these are symbols that are used to
manipulate a certain value or operand. Operators are used to perform specific
mathematical and logical computations on operands.
Types of operators:-

Arithmetic operators

Assignment operators

Comparison operators

Logical operators

Bitwise operators

Ternary operators

Relational operators

String operators

Comma operators

Switch statement (case) in javascript.

JS switch statement is used to execute a block code from multiple expressions.

JS switch statement is used with a break or default keyword (optional and both can be
used together also)

Break: this keyword is used to break out of the switch block. This stops
the executions inside the code block.

Default: this keyword is used to specify a piece of code if no case


matches the given conditions.

Syntax:- switch (expression)

{
Case value1:

Statement;

Break;

Case value n;

Statement;

Break;

Default:

Statement default;

Explanations:- cases are compared strictly.

Duplicate case values are not allowed.

The expressions can be of type number or string.

The break statement is used inside the switch to terminate a statement sequence.

Javascript loops and its types.

Loops:- the JS loops are used to iterate the piece of code using for, while, do while or for
in loops. It makes the code compact.

Types of loops:-

For loop

While loop

Do while loop
For in loop

For loop:- the js for loop interate the elements for the fixed numbers of times. It
should be used if number of iteration is known.

Syntax- for(initialization; condition; increment)

code to be execute

While loop:- while loop iterates the element for the infinite numbers of items. It
should be used if number of iteration is not known. Syntax- while(condition)

code to be execute

Do while loop:- it iterates the element for the infinite number of times likes while
loop. But code is executed at least once thether condition is true or false.

Syntax-

do{

code to be execute

while (condition);

For in loop:- for in loop is used to iterate the properties of an object.

Java script function.

Java script functions are used to perform operations. We call javascript function many
times to reuse the code.
Syntax:-

Function function name([arg1, arg2,……..argN])

//code to be executed

Advantage of function in javascript:-

You might also like