Professional Documents
Culture Documents
HTML Css JS: FSMK Camp'20 Dharshan
HTML Css JS: FSMK Camp'20 Dharshan
FSMK CAMP’20
Dharshan
1 / 58
internet?
● What is it?
2 / 58
How web works?
● Client
● Server
● Protocol
3 / 58
Demonstration..
● Internet is a city
● On one side of the road there is shop
webserver
● On ther other side your house aka
client
● Roads are like internet connections
● Mode of transport bus/car/bike are
like TCP/IP
● Search for addres in that street DNS
● The language you use to order goods
HTTP 4 / 58
●
How exaclty it works?
6 / 58
HTML
● elements
● tags
● attributes
8 / 58
Elements and tags
10 / 58
HTML
<!DOCTYPE html>
<html>
<head>
</head>
<body>
</body>
</html>
11 / 58
<html>
12 / 58
<head>
13 / 58
</body>
14 / 58
comments
15 / 58
headings
16 / 58
● Search engines use the headings to
paragraphs
● <p> </p>
17 / 58
Text Formatting
● Ordered
– <ol> </ol>
● Un-ordered
– <ul> </ul>
● List item
– <li> </li>
19 / 58
images
● <img >
● Self closing tag
20 / 58
links
● <a> </a>
21 / 58
tables
22 / 58
Exercise
23 / 58
video
● <video src=””></video>
● Controls
● loop
24 / 58
audio
● <audio controls>
<source src=”test.mp3”>
● </audio>
25 / 58
forms
● Dropdown
– <select>
● <option>val1</option>
● <option>val2</option>
● </select>
27 / 58
Forms..
● Radio
● <Input type=”radio” name=”” value=””>
28 / 58
Exercise
29 / 58
Div
● <div> </div>
● <div> tag defines a division or a
section in an HTML document.
● <div> element is often used as a
container for other HTML elements to
style them with CSS or to perform
certain tasks with JavaScript.cd
30 / 58
Semantic HTML
● Header
● Nav
● Article
● Figure
● Aside
● footer
31 / 58
CSS
32 / 58
syntax
selector {
property: value
}
ex:
p {
background-color: red
}
33 / 58
Selectors
● Element
● Class
● ID
34 / 58
Element selectors
element {
property: value;
property: value;
}
ex:
p {
font-size: 25px;
}
35 / 58
Class selectors
.class-name {
property: value;
property: value;
}
ex:
<p class=”my-class”>my paragraph</p>
36 / 58
ID selectors
#id-selector{
color: red;
}
37 / 58
External style sheets
38 / 58
padding
Element {
Padding-top: 50px;
Padding-right: 60px;
Padding-bottem: 40px;
Padding-left: 30px;
}
39 / 58
borders
element {
border-style: solid;
border-width: 2px;
border-color: green;
}
40 / 58
margin
element {
margin-top: 20px;
margin-right: 30px;
margin-bottom: 20px;
margin-left: 30px;
}
41 / 58
CSS Box model
a box that wraps around every HTML
element
42 / 58
colors
43 / 58
positioning
● Relative
● Absolute
● Fixed
44 / 58
Text alignment/styling
45 / 58
JavaScript
46 / 58
variables
● var
● let
● const
47 / 58
Datatype
● String
● Number
● Boolean
● Null
● undefined
48 / 58
strings
49 / 58
Operators
● addition
● subtraction
● multiplication
● division
● modulo
50 / 58
Boolean
51 / 58
Null and undefined
52 / 58
If, if else, else if
● if (somecondtiion){
}
● if (somecondtiion){
} else {
}
● if (somecondtiion){
} else if( some other cond) {
} else {
}
53 / 58
switch
switch(){
case1:
console.log
break;
case1 :
break;
default:
break;
}
54 / 58
&& || !
If((first_condition) &&
(second_condition)) {
}
If((first_condition) &&
(second_condition)) {
}
55 / 58
for
for(initialisation; condition;
increment){
56 / 58
while
whle(condition){
}
57 / 58
exercise
● Guessing game
58 / 58