HTML Presentation 1
HTML Presentation 1
ENGINEERING NAGOTHANE
DEPARTMENT OF COMPUTER ENGINEERING
Academic year 2023 – 2024
Industrial Training (22057)
“Web Development using HTML, CSS and JavaScript”
What is Web Development
Web development refers to the creating, building, and maintaining of
websites. It includes aspects such as web design, web publishing, web
programming, and database management. It is the creation of an application
that works over the internet i.e. websites.
Web Development can be classified into two ways:
Frontend Development
Backend Development
What is Front End Development?
Everything you see on a website, like buttons, links, animations, and more,
were created by a front end web developer. It is the front end developer's job to
take the vision and design concept from the client and implement it through
code.
Now, let us
understand how it works
Web server
Web Browser
Brief Introduction of HTML
HTML is an acronym which stands for Hyper Text Markup Language which is
used for creating web pages and web application. Let’s see what is meant by
Hypertext Markup Language, and Web page
Hyper Text: Hyper Text simply means “Text within text”. A text has a link
within it, is a hypertext. Whenever you click on a link which brings you to a
new webpage, you have clicked on a hypertext. Hypertext is a way to link two or
more web pages (HTML documents) with each other
Markup Language: A markup language is a computer language that is used to
apply layout and formatting conventions to a text document. Markup language
makes text more interactive and dynamic. It can turn text into images, tables,
links, etc.
Features of HTML
It is a very easy and simple language. It can be easily understood and modified.
It is very easy to make an effective presentation with HTML because it has a lot
of formatting tags.
It is a markup language, so it provides a flexible way to design web pages along
with the text.
It facilitates programmers to add a link on the web pages (by html anchor tag),
so it enhances the internet of browsing of the user
It is platform-independent because it can be displayed on any platform like
Windows, Linux, Macintosh, etc.
HTML is a case-insensitive language, which means we can use tags either in
lower-case or upper-case.
HTML
HTML tags are like keywords which defines that how web browser will format
and display the content.
Syntax
HTML Text Tags
<tag>content</tag>
<p>, <h1>, <h2>, <h4>, <h5>, <h6>, <strong>,
HTML Tag Examples
<em>, <abbr>, <acronym>, <address>,<bdo>,
<p>Paragraph Tag</p> <blockquote>, <cite>, <q>, <samp>, <var>
<h2>Heading Tag</h2> <code>, <ins>, <del>, <kbd>, <pre>
<b>Bold Tag</b>
<i>Italic Tag</i>
<u>Underline Tag</u>
Unclosed HTML Tags
Some HTML tags are not closed, for example br and hr.
<br>Tag: br stands for break line.
<hr>Tag: hr stands for Horizontal Rule. This tag is used to put a line across the
webpage
Brief Introduction of HTML
<!DOCTYPE html>
<html>
<head>
<title>
Web page title
</title>
</head>
<body>
<h1>Write Your First Heading</h1>
<p>Write Your First Paragraph.</p>
</body>
</html>
Introduction to elements of HTML
Block-level element
These are the element, which structure main part of web page, by diving a page
into coherent block.
A block-level element always start with new line and takes the full width of web
page, from left to right.
Following are the block-level element in HTML
<address>,, <dd>, <div>, <dl>, <footer>, <form>, <h1>, <h6>, <header>, <li>,
<main>, <nav>, <ol>, <output>, <p>, <pre>, <section>, <table>, <ul>, <video>.
Inline element
Inline elements are those element, which differentiate the part of a given text
and provide it a particular function.
These element does not start with new line and take width as per requirement.
The inline element are mostly used with other element.
<a>, <b>, <br>, <button>, <code>, <i>, <img>, <input>, <label>, <select>,
<small>, <strong>, <sub>, <sup>, <var>.
Example of block-level element tag
<DOCTYPE html>
<html>
<head>
</head>
<body>
<div style="background-color:lightblue">This is first div</div>
<div style="background-color:lightgreen">This is second div</div>
<p style="background-color:pink">This is a block level element</p>
</body>
</html>
o/p :
Example of Inline elemment
<DOCTYPE html>
<html>
<head>
</head>
<body>
<a href="https://www.google.com">Click on link</a>
<span style="background-color:lightgreen">This is inline element</span>
<p>This will take width of text only</p>
</body>
</html>
o/p :
Working with list
HTML list are used to specify list of information.
In the ordered HTML lists, all the list items are marked with numbers by default.
He ordered list starts with <ol> tag and the list items start with <li> tag.
1. <ol>
2. <li>Aries</li> Output:
3. <li>Apple</li> 1.Areis
4. <li>Mango</li> 2.Apple
5. <li>Pine apple</li> 3.Mango
4.Pine apple
6. </ol>
Working with lists
HTML Unordered list or Bulleted List
in HTML Unordered list, all the list items are marked with bullets.
HTML table tag is used to display data in tabular form (row*column). There
navigation bar, body content, footer section ect. But it is recommended to ues
div tag over table to mange the layout of the page
Working with table
Emxaple of table tags
<DOCTYPE html> <td>Evelyn</td>
<html> <td>32</td>
<head> <td>Ohio</td>
</head> </tr>
<body> </table>
<table border="1" cellpadding="5"> </body>
<tr> </html>
<th>Name</th>
<th>Age</th> Output :
<th>Country</th>
</tr>
<tr>
<td>Michael</td>
<td>27</td>
<td>Alaska</td>
</tr>
<tr>
Working with Frame
HTML <frame> tag define the particular area within an HTML file where
another HTML web page can be displayed.
A <frame> tag is used with <frameset>, and it divided a webpage into multiple
sections or frames, and each frame can contain different web pages.
<!DOCTYPE html>
<html>
<head>
<title>Frame tag</title>
</head>
<frameset cols="25%,50%,25%">
<frame src="frame1.html" >
<frame src="frame2.html">
<frame src="frame3.html">
</frameset>
</html>
Working with image
The HTML <img> tag is used to embed an image in a web page.
Images are not technically inserted into a web page; images are linked to web
pages. The <img> tag creates a holding space for the referenced image.
1) src
It is a necessary attribute that describes the source or path of the image. It
instructs the browser where to look for the image on the server.
The location of image may be on the same directory or another server.
2) alt
The alt attribute defines an alternate text for the image, if it can't be displayed.
The value of the alt attribute describe the image in words. The alt attribute is
considered good for SEO prospective.
Syntax
<img src="url" alt="alternatetext">
Example of Image Tag
<!DOCTYPE html>
<html>
<body>
<h2>HTML Image</h2>
<img src="image/shirtC.jpg" alt="Flowers in Chania" width="460" height="345">
</body>
</html>
O/P :
Working with Video
HTML Video tag
HTML 5 supports <video> tag also. The HTML video tag is used for streaming
video files such as a movie clip, song clip on the web page.
The controls attribute adds video controls, like play, pause, and volume.
It is a good idea to always include width and height attributes. If height and
width are not set, the page might flicker while the video loads.
Example of Video tag
Example:
1. <!DOCTYPE html>
2. <html>
3. <body>
4. <video src="Wildlife.wmv" width="480" height="320" controls
muted></video>
5. </body>
6. </html>
O/P :
Working with Marquee
The Marquee HTML tag is a non-standard HTML element which is used to
scroll a image or text horizontally or vertically.
In simple words, you can say that it scroll the image or text up, left or right
automatically.
Marquee tag was first introduced in early version of Microsoft’s Internet
Explorer. It is compared with Netscape’s blink element.
Working with Marquee
HTML Scroll Marquee
It is a by default property. It is used to scroll the text from right to left, and
restart at the right side of the marquee when it is reached to the end of left side.
After the completion of loop text disappears.
The <form> element is a container for different types of input elements, such
Syntax of Form :
</form>
Working with Form
HTML Form Tags
Working with Form
HTML <form> element
The HTML <form> element provide a document section to take input from
user. It provides various interactive controls for submitting information to web
server such as text field, text area, password field, etc.
1. <form>
2. <label for="firstname">First Name: </label> <br/>
3. <input type="text" id="firstname" name="firstname"/> <br/>
4. <label for="lastname">Last Name: </label>
5. <input type="text" id="lastname" name="lastname"/> <br/>
6. </form>
Working with Form
1. <!DOCTYPE html>
2. <html>
3. <body>
4. <form>
5. <label for="firstname">First Name: </label> <br/>
6. <input type="text" id="firstname" name="firstname"/> <br/>
7. <label for="lastname">Last Name: </label> </br>
8. <input type="text" id="lastname" name="lastname"/> <br/>
9. </form>
10. </body>
11. </html>
O/P :
Working with Form
HTML Password Field Control
<form>
<label for="password">Password: </label>
<input type="password" id="password" na
me="password"/> <br/>
</form>
O/P:
Working with Form
HTML Email Field Control
The email field in new in HTML 5. It validates the text for correct email
address. You must use @ and . in this field.
<form>
<label for="email">Email: </label>
<input type="email" id="email" name="email"/
> <br/>
</form>
Working with Form
Radio Button Control
The radio button is used to select one option from multiple options. It is used
for selection of gender, quiz questions etc.
If you use one name for all the radio buttons, only one radio button can be
selected at a time.
Using radio buttons for multiple options, you can only choose a single option at
a time.
Working with Form
Example of Radio button :
<form>
<label for="gender">Gender: </label>
<input type="radio" id="gender" name="gender" val
ue="male"/>Male
<input type="radio" id="gender" name="gender" val
ue="female"/>Female <br/>
</form>
O/P :
Working with form
Submit button control
HTML <input type="submit"> are used to add a submit button on web page.
When user clicks on submit button, then form get submit to the server.
<form>
<label for="name">Enter name</label><br>
<input type="text" id="name" name="name">
<br>
<label for="pass">Enter Password</
label><br>
<input type="Password" id="pass" name="pass
"><br>
<input type="submit" value="submit">
</form>
Introduction To CSS
CSS stands for Cascading Style Sheet.
HTML, CSS and JavaScript are used for web designing. It helps the web
1. Inline CSS
2. Internal CSS
3. External CSS
1) Inline CSS
Inline CSS is used to apply CSS on a single line or element.
For example :
3) External CSS
External CSS is used to apply CSS on multiple pages or all pages. Here, we write
all the CSS code in a css file. Its extension must be .css for example style.css.
For Example :
p{color:blue}
CSS Comments
CSS comments are generally written to explain your code. It is very helpful for
the users who reads your code so that they can easily understand the code.
Comments are single or multiple lines statement and written within /*............*/
.
For Example :
p{
color: blue;
/* This is a single-line comment */
text-align: center;
}
CSS Background
CSS background property is used to define the background effects on element.
There are 5 CSS background properties that affects the HTML elements:
1. background-color
2. background-image
3. background-repeat
4. background-attachment
5. background-position
CSS Background
1) CSS background-color
The CSS border properties are use to specify the style, color and size of the
border of an element. The CSS border properties are given below
border-style
border-color
border-width
border-radius
CSS Border
1) CSS border-style
The Border style property is used to specify the border type which you want to display on
the web page.
There are some border style values which are used with border-style property to define a
border.
For Example :
<style>
p.none {border-style: none;}
p.dotted {border-style: dotted;}
p.dashed {border-style: dashed;}
p.solid {border-style: solid;}
p.double {border-style: double;}
p.groove {border-style: groove;}
p.ridge {border-style: ridge;}
p.inset {border-style: inset;}
p.outset {border-style: outset;}
p.hidden {border-style: hidden;}
</style>
CSS Border
2) CSS border-width
The border-width property is used to set the border's width. It is set in pixels. You can also use the
one of the three pre-defined values, thin, medium or thick to set the width of the border.
1. <style>
2. p.one {
3. border-style: solid;
4. border-width: 5px;
5. }
6. p.two {
7. border-style: solid;
8. border-width: medium;
9. }
10. p.three {
11. border-style: solid;
12. border-width: 1px;
13. }
14. </style>
15. </head>
16. <body>
17. <p class="one">Write your text here.</p>
18. <p class="two">Write your text here.</p>
19. <p class="three">Write your text here.</p>
20. </body>
CSS Border
3) CSS border-color
RGB: It specifies the RGB value of the color. For example: "rgb(255,0,0)".
Hex: It specifies the hex value of the color. For example: "#ff0000".
CSS Border
For Example :
1. p.one {
2. border-style: solid;
3. border-color: red;
4. }
5. p.two {
6. border-style: solid;
7. border-color: #98bf21;
8. }
9. </style>
10. </head>
11. <body>
12. <p class="one">This is a solid red border</p>
13. <p class="two">This is a solid green border</p>
CSS Border
CSS border-radius property
This CSS property sets the rounded borders and provides the rounded corners
around an element, tags, or div. It defines the radius of the corners of an
element.
We can use it on almost every HTML element. To style the link to unvisited
pages, we can use the :link selector.
To style the link for visited pages, we can use the :visited selector and to style
the active links we can use the :active selector.
CSS Hover
The hover feature includes the following effects:
hover{
css declarations;
}
CSS Hover
Example of hover effect : O/p :
1. <html>
2. <head>
3. <style>
4. body{
5. text-align:left;
6. }
7. h1:hover{
8. background-color: yellow;
9. }
10. </style>
11. </head>
12. <body>
13. <h1>Hello World</h1>
14. </body>
15. </html>
CSS Navigation
A Navigation bar or navigation system comes under GUI that helps the visitors
in accessing information. It is the UI element on a webpage that includes links
for the other sections of the website.
A navigation bar is mostly displayed on the top of the page in the form of a
horizontal list of links. It can be placed below the logo or the header, but it
should always be placed before the main content of the webpage.
CSS Navigation
Horizontal Navigation Bar
The horizontal navigation bar is the horizontal list of links, which is generally
on the top of the page.
Let's see how to create a horizontal navigation bar by using an example.
Example
In this example, we are adding the overflow: hidden property that prevents
the li elements from going outside of the list, display: block property displays
the links as the block elements and makes the entire link area clickable.
We are also adding the float: left property, which uses float for getting the
block elements to slide them next to each other.
If we want the full-width background color then we have to add
the background-color property to <ul> rather than the <a> element.
Example Of Horizontal Navigation bar text-decoration: none;
}
<!DOCTYPE html> .active{
<html> background-color: gray;
<head> color: white;
<style> }
ul { li a:hover {
list-style-type: none; background-color: orange;
margin: 0; color: white;
padding: 0px; }
overflow: hidden; </style>
background-color: lightgray; </head>
} <body>
li { <ul>
float: left; <li><a class="active"
} href="#home">Home</a></li>
li a { <li><a href="#">Java</a></li>
display: block; <li><a href="#">HTML</a></li>
color: blue; <li><a href="#">CSS</a></li>
font-size:20px; </ul>
text-align: center; </body>
padding: 10px 20px; </html>
CSS Transitions
The CSS transitions are effects that are added to change the element gradually
from one style to another, without using flash or JavaScript.
Syntax:
transition-duration: time;
1. Example of CSS Transition
2. <!DOCTYPE html>
3. <html>
4. <head>
5. <style>
6. div {
7. width: 100px;
8. height: 100px;
9. background: red;
10. transition: width 2s;
11. }
12. div:hover {
13. width: 300px;
14. }
15. </style>
16. </head>
17. <body>
18. <h1>The transition Property</h1>
19. <p>Hover over the div element below, to see the transition effect:</p>
20. <div></div>
21. </body>
22. </html>
What is JavaScript
JavaScript is the world's most popular programming language.
environments.
JavaScript follows the syntax and structure of the C programming language. Thus,
It is a case-sensitive language.
Displaying pop-up windows and dialog boxes (like an alert dialog box, confirm
JavaScript is a dynamic type language, means you don't need to specify type
of the variable because it is dynamically used by JavaScript engine.
You need to use var here to specify the data type. It can hold any type of values
such as numbers, strings etc.
For Example :
var a=40;//holding number
var b="Rahul";//holding string
Javascript Data Types
JavaScript primitive data types JavaScript non-primitive data types
JavaScript Operators
JavaScript operators are symbols that are used to perform operations on
operands.
For example:
var sum=10+20;
if(expression){
//content to be evaluated
}
Exmple :
<script>
var a=20;
if(a>10){
document.write("value of a is greater than 10");
}
</script>
JavaScript Decision Making
JavaScript If...else Statement
It evaluates the content whether condition is true of false. The syntax of
JavaScript if-else statement is given below.
Syntax :
if(expression){
//content to be evaluated if condition is true
}
else{
//content to be evaluated if condition is false
}
JavaScript Decision Making
JavaScript If...else if statement
It evaluates the content only if expression is true from several expressions. The
signature of JavaScript if else if statement is given below.
Syntax :
if(expression1){
//content to be evaluated if expression1 is true
}
else if(expression2){
//content to be evaluated if expression2 is true
}
else if(expression3){
//content to be evaluated if expression3 is true
}
else{
//content to be evaluated if no expression is true
}
JavaScript Decision Making
Example of if….else if Statement
1. <script>
2. var a=20;
3. if(a==10){
4. document.write("a is equal to 10");
5. }
6. else if(a==15){
7. document.write("a is equal to 15");
8. }
9. else if(a==20){
10. document.write("a is equal to 20");
11. }
12. else{
13. document.write("a is not equal to 10, 15 or 20");
14. }
15. </script>
JavaScript Switch
The JavaScript switch statement is used to execute one code from multiple
expressions. It is just like else if statement that we have learned in previous page. But
it is convenient than if..else..if because it can be used with numbers, characters etc.
Syntax :
switch(expression){
case value1:
code to be executed;
break;
case value2:
code to be executed;
break;
......
default:
code to be executed if above values are not matched;
}
1. Example Of Switch :
2. <script> O/P :
3. var grade='B';
4. var result;
5. switch(grade){
6. case 'A':
7. result="A Grade";
8. break;
9. case 'B':
10. result="B Grade";
11. break;
12. case 'C':
13. result="C Grade";
14. break;
15. default:
16. result="No Grade";
17. }
18. document.write(result);
19. </script>
JavaScript Loops
The JavaScript loops are used to iterate the piece of code using for, while, do
while or for-in loops. It makes the code compact. It is mostly used in array.
1. for loop
2. while loop
3. do-while loop
4. for-in loop
JavaScript Loops
1) JavaScript For loop
The JavaScript for loop iterates the elements for the fixed number of times. It
should be used if number of iteration is known. The syntax of for loop is given
below.
Syntax :
for (initialization; condition; increment)
{
code to be executed
}
Example : O/P :
<script>
for (i=1; i<=5; i++)
{
document.write(i + "<br/>")
}
</script>
JavaScript Loops
2) JavaScript while loop
The JavaScript while loop iterates the elements for the infinite number of times. It
should be used if number of iteration is not known. The syntax of while loop is given
below.
Syntax :
while (condition)
{
code to be executed
}
Example : O/P :
1. <script>
2. var i=11;
3. while (i<=15)
4. {
5. document.write(i + "<br/>");
6. i++;
7. }
8. </script>
JavaScript Loops
3) JavaScript do while loop
The JavaScript do while loop iterates the elements for the infinite number of
times like while loop. But, code is executed at least once whether condition is true
or false. The syntax of do while loop is given below.
Syntax :
do{
code to be executed
}while (condition);
Example : O/P :
1. <script>
2. var i=21;
3. do{
4. document.write(i + "<br/>");
5. i++;
6. }while (i<=25);
7. </script>
CONCLUSION
This industrial training gave use the knowledge about the web
development.
We came to know about the important of web site and web pages.
Overall, industrial training has been taking by student during semester
5 was very useful for me.
I gain a lot of knowledge from this industrial training
Well explained by the our mentor about Web development languages.
1. HTML
2. CSS
3. Javascript
THANK YOU