SlideShare a Scribd company logo
Tutorial - 4
• CSS basic tricks:
⚬ Transition
⚬ Transform property
⚬ Basics of Grid
⚬ Rows & Graphs in Grid
⚬ Spanning multiple & Col in
Grid
⚬ Autofix & Min-Max
⚬ Creating layout using grid
⚬ Using Media with CSS Grid
• JavaScript
⚬ Introduction
⚬ Variables & Data types and operators
⚬ Strings in JS
⚬ String Function
⚬ Array 1D & MD
⚬ Array functions
⚬ If-else & Switch
⚬ Object in JS (basic to advance)
⚬ Functions in JS
⚬ this in JS
⚬ Alert, Prompt, Confirm, Consoles
⚬ Loops
■ For, while, do-while
Yesterday's revision
• Visibility and z index
• Flexbox
• em, rem, vh and vw
• media queries
• selectors
• nth child
• before and after pseudo selectors
• box shadow & Text shadow
• variables & custom properties
• creating animation & transition
Transform
• transform helps to add more animations to your
element on DOM
• Some basic properties are:
⚬ transform: rotate(360deg);
■ This rotate the element by 360 deg
⚬ transform: skew(40deg);
■ This will make your elemnt skewed
⚬ transform: scale(2);
■ Zoom in effect is applied by it
Some basic properties of transform (cont...):
• transform: translateX(123px);
⚬ Move element on X-axis
• transform: translateY(123px);
⚬ Move element on Y-axis
• transform: translate(123px, 123px);
⚬ Move element on both the axis
Just to support all above properties with an ease we use
transition property:
• transition: all 0.5s ease-in-out;
Grid system
• It'll help us to create the grid layout & eventually helpful in
development of layouts while developing responsive website
• NOTE: you have to apply now ---- display: grid
• some commonly used grid properties are:
⚬ grid-template-columns: 300px auto 100px;
■ defines the width of columns of grid
⚬ grid-template-columns: 1fr 4fr 1fr;
■ defines col width but in ratios e.g.: 1:4:1
⚬ grid-template-columns: repeat(3, auto);
■ defines the width as "auto" for 3 columns , basically its kind of
looping function
⚬ grid-gap: 2rem;
■ gives margin between all columns
Up-till now we have seen grid properties w.r.t. col now
we'll be looking into grid properties w.r.t. rows
• grid-template-rows: 1fr 1fr 4fr;
⚬ divide row wise in ratios
• grid-auto-rows: 2fr;
⚬ when we have many rows and we just want same
grid row size to all then we use grid-auto-rows
Grid with spanning
• Spanning means you'll be using grid design in a
combined format
• major properties to achieve spanning in grid
are:
⚬ grid-column-start , grid-row-start
■ while combining grids it helps to define
starting point w.r.t col & rows
Grid spanning (cont...)
⚬ grid-column-end, grid-row-end
■ defines the ending of spanning
⚬ grid-column: 1 / span 3;
■ shorthand for col spanning
⚬ grid-row: 1 / span 3;
■ shorthand for row spanning
Grid- minmax property
• property used here is:
⚬ grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
• It is use full to build responsive layouts where we specify that
minimum certain width should be provided and maximum certain
width is provided
⚬ It's kind of similar to what we did in media-
query
Grid Template Area
• Why we use it:
⚬ to easily build the layouts area-wise
• Uptill now we have seen grid-template-row &
grid-template-columns now we are looking into
grid-template-area
• e.g:
⚬ grid-template-areas:
⚬ 'navbar navbar navbar navbar'
⚬ 'section section section aside'
⚬ 'footer footer footer footer ';
grid-area-template (cont...)
• grid-area-template must be provided a reference
by property named "grid-area" inside any
applied selector:
⚬ e.g:
■ #navbar {
■ grid-area: navbar;
■ }
■ #section {
■ grid-area: section;
■ }
■ #aside {
■ grid-area: aside;
■ }
■ footer {
■ grid-area: footer;
■ }
Grid with media query
Please lets code instead !!
JavaScrip
t
JavaScript (What, When, How, Why)
• What:
⚬ JavaScript is a scripting or programming
language that allows you to implement
complex features on web pages
• When
⚬ If you want to implement some logic to
your website then you use JS
• "JavaScript" is everywhere
⚬ It means doesn't matter its web
development or mobile development or in
IOT or on server side ,
■ JavaScript can handle everything
⚬ On web it form base for many libraries like
React.js on Front-end and Node.js for
Backend even Node.js is used in IOT also
⚬ React Native is used for mobile
development
• Write javascript in HTML is possible via
<script> tag
• Most developer uses browser's devtool along
with its console for debugging and in general
while doing development
• NOTE: JavaScript is way more advance then
any other equally aged language like Java,
CPP or C
• Best combination in market is of MERN stack
⚬ Mongo-Express-React-Node
Datatypes &
operators
• JS has 7 types of datatypes only :
⚬ Number (x= 90)
⚬ String (x="hello world")
⚬ Boolean (x=true, y=false)
⚬ Object (x={first_name:"Hello"})
⚬ undefined (x=undefined)
⚬ null (x=null)
⚬ array (x=[])
Important links for datatypes in JS are:
• https://www.w3schools.com/js/js_datatypes.asp
• https://www.programiz.com/javascript/data-types
• primitive data types:
⚬ String, Number, Boolean, undefined & null
• reference or special or composite datatyes:
⚬ Array, Object and Functions
Operators in JS
• Following are the types of operators in JS
⚬ Assignment Operators
⚬ Arithmetic Operators
⚬ Comparison Operators
⚬ Logical Operators
⚬ Bitwise Operators
⚬ String Operators
⚬ Some special kind of Operators
• Lets jump to :
⚬ https://www.programiz.com/javascript/operators
Object in JavaScript
• Almost everything in JavaScript is either is object
or Primitives.
• Object form base for, function or class or
Number or Boolean or Date or Math or RegX or
Array , etc..
• e.g:
⚬ let person = {firstName:"John", lastName:"Doe", age:50,
eyeColor:"blue"};
How to create an object in JS:
• Using object literal
⚬ const person = {firstName:"John", lastName:"Doe",
age:50, eyeColor:"blue"};
• Using new keyword
⚬ const person = new Object();
⚬ person.firstName = "John";
⚬ person.lastName = "Doe";
⚬ person.age = 50;
⚬ person.eyeColor = "blue";
• Define an object constructor, and then create
objects of the constructed type.
⚬ function Person(first, last, age, eye) {
⚬ this.firstName = first;
⚬ this.lastName = last;
⚬ this.age = age;
⚬ this.eyeColor = eye;
⚬ }
• https://www.w3schools.com/js/js_object_constructo
rs.asp
• Create an object using Object.create()
⚬ var foo = new Foo();
⚬ var foo = Object.create(Foo.prototype);
Interview Question:
• Difference between new and Object.create
⚬ https://stackoverflow.com/questions/41
66616/understanding-the-difference-
between-object-create-and-new-
somefunction
Arrays in JavaScript
• 1-D arrays
⚬ const x = ['a', 1, false, -22]
• 2-D array:
⚬ const x = [[1,2], [2,3],67]
Question:
• const x = [1,2] + [2,3]
• const y = [[1,2],'90',[34]] + [[2,3],[5,5]]
Strings in JS
• const x = "a"
• const x1 = "aaaaa"
• const y = "a" + 121212
• const q = `aapppp${x}${y}`

More Related Content

PPT
Web development basics (Part-2)
PPT
Web development basics (Part-7)
PPT
Web development basics (Part-5)
PPT
Web development basics (Part-6)
PPT
Web development basics (Part-1)
PPTX
JavaScript operators
PPTX
Javascript 01 (js)
PPT
Web development basics (Part-4)
Web development basics (Part-2)
Web development basics (Part-7)
Web development basics (Part-5)
Web development basics (Part-6)
Web development basics (Part-1)
JavaScript operators
Javascript 01 (js)
Web development basics (Part-4)

What's hot (19)

PDF
JavaScript - Chapter 3 - Introduction
PPTX
JavaScript Basics
PDF
The Skinny on Slim
PPTX
PHP Basics
PPTX
JS Event Loop
PDF
Spa with angular
PDF
Web application
PDF
Ruby and Rails by Example (GeekCamp edition)
PDF
Fighting Ruby code smell
KEY
Frozen rails 2012 - Fighting Code Smells
PDF
Web application
PDF
Introduction to SPA with AngularJS
PPTX
AngularConf2015
PDF
Build a game with javascript (may 21 atlanta)
PDF
Javascript Roadmap - The Basics
PDF
Being a jsp
PDF
Saigon Ruby Meetup 06/10/2015 - Changeful Gem
JavaScript - Chapter 3 - Introduction
JavaScript Basics
The Skinny on Slim
PHP Basics
JS Event Loop
Spa with angular
Web application
Ruby and Rails by Example (GeekCamp edition)
Fighting Ruby code smell
Frozen rails 2012 - Fighting Code Smells
Web application
Introduction to SPA with AngularJS
AngularConf2015
Build a game with javascript (may 21 atlanta)
Javascript Roadmap - The Basics
Being a jsp
Saigon Ruby Meetup 06/10/2015 - Changeful Gem
Ad

Similar to Web development basics (Part-3) (20)

PDF
Front end technologies
PDF
Render Conf: Start using CSS Grid Layout Today
PDF
CSS vs. JavaScript - Trust vs. Control
PPTX
Cordova training : Day 4 - Advanced Javascript
PPT
17523630.ppt
PDF
Start Using CSS Grid Layout Today - RuhrJS
PDF
CSS3 Refresher
PDF
Laying out the future with grid & flexbox - Smashing Conf Freiburg
PDF
DevFest Nantes - Start Using CSS Grid Layout today
PDF
Grids of Tomorrow: CSS Grid Layout
PPTX
Full Stack Development CSS_Layouts,Grid,FlexboxPPT.pptx
PDF
Frontend United: Start using CSS Grid Layout today!
PPTX
Css Grid Layout - A Short Introduction - Part 1
PPTX
Advanced css for designing responsive web page on website
PDF
Grid and Flexbox - Smashing Conf SF
PDF
Evergreen websites for Evergreen browsers
PDF
Flexbox, Grid and Sass
PPTX
MTA css layouts
PPTX
Java script
PDF
CSS Grid Layout
Front end technologies
Render Conf: Start using CSS Grid Layout Today
CSS vs. JavaScript - Trust vs. Control
Cordova training : Day 4 - Advanced Javascript
17523630.ppt
Start Using CSS Grid Layout Today - RuhrJS
CSS3 Refresher
Laying out the future with grid & flexbox - Smashing Conf Freiburg
DevFest Nantes - Start Using CSS Grid Layout today
Grids of Tomorrow: CSS Grid Layout
Full Stack Development CSS_Layouts,Grid,FlexboxPPT.pptx
Frontend United: Start using CSS Grid Layout today!
Css Grid Layout - A Short Introduction - Part 1
Advanced css for designing responsive web page on website
Grid and Flexbox - Smashing Conf SF
Evergreen websites for Evergreen browsers
Flexbox, Grid and Sass
MTA css layouts
Java script
CSS Grid Layout
Ad

Recently uploaded (20)

PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
System and Network Administration Chapter 2
PPTX
history of c programming in notes for students .pptx
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Complete React Javascript Course Syllabus.pdf
PPTX
ISO 45001 Occupational Health and Safety Management System
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PDF
top salesforce developer skills in 2025.pdf
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
ai tools demonstartion for schools and inter college
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
Transform Your Business with a Software ERP System
PDF
System and Network Administraation Chapter 3
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PPT
JAVA ppt tutorial basics to learn java programming
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Operating system designcfffgfgggggggvggggggggg
Upgrade and Innovation Strategies for SAP ERP Customers
System and Network Administration Chapter 2
history of c programming in notes for students .pptx
Which alternative to Crystal Reports is best for small or large businesses.pdf
Complete React Javascript Course Syllabus.pdf
ISO 45001 Occupational Health and Safety Management System
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
top salesforce developer skills in 2025.pdf
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
ai tools demonstartion for schools and inter college
Wondershare Filmora 15 Crack With Activation Key [2025
Transform Your Business with a Software ERP System
System and Network Administraation Chapter 3
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
JAVA ppt tutorial basics to learn java programming
PTS Company Brochure 2025 (1).pdf.......
VVF-Customer-Presentation2025-Ver1.9.pptx
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises

Web development basics (Part-3)

  • 1. Tutorial - 4 • CSS basic tricks: ⚬ Transition ⚬ Transform property ⚬ Basics of Grid ⚬ Rows & Graphs in Grid ⚬ Spanning multiple & Col in Grid ⚬ Autofix & Min-Max ⚬ Creating layout using grid ⚬ Using Media with CSS Grid • JavaScript ⚬ Introduction ⚬ Variables & Data types and operators ⚬ Strings in JS ⚬ String Function ⚬ Array 1D & MD ⚬ Array functions ⚬ If-else & Switch ⚬ Object in JS (basic to advance) ⚬ Functions in JS ⚬ this in JS ⚬ Alert, Prompt, Confirm, Consoles ⚬ Loops ■ For, while, do-while
  • 2. Yesterday's revision • Visibility and z index • Flexbox • em, rem, vh and vw • media queries • selectors • nth child • before and after pseudo selectors • box shadow & Text shadow • variables & custom properties • creating animation & transition
  • 3. Transform • transform helps to add more animations to your element on DOM • Some basic properties are: ⚬ transform: rotate(360deg); ■ This rotate the element by 360 deg ⚬ transform: skew(40deg); ■ This will make your elemnt skewed ⚬ transform: scale(2); ■ Zoom in effect is applied by it
  • 4. Some basic properties of transform (cont...): • transform: translateX(123px); ⚬ Move element on X-axis • transform: translateY(123px); ⚬ Move element on Y-axis • transform: translate(123px, 123px); ⚬ Move element on both the axis Just to support all above properties with an ease we use transition property: • transition: all 0.5s ease-in-out;
  • 5. Grid system • It'll help us to create the grid layout & eventually helpful in development of layouts while developing responsive website • NOTE: you have to apply now ---- display: grid • some commonly used grid properties are: ⚬ grid-template-columns: 300px auto 100px; ■ defines the width of columns of grid ⚬ grid-template-columns: 1fr 4fr 1fr; ■ defines col width but in ratios e.g.: 1:4:1 ⚬ grid-template-columns: repeat(3, auto); ■ defines the width as "auto" for 3 columns , basically its kind of looping function ⚬ grid-gap: 2rem; ■ gives margin between all columns
  • 6. Up-till now we have seen grid properties w.r.t. col now we'll be looking into grid properties w.r.t. rows • grid-template-rows: 1fr 1fr 4fr; ⚬ divide row wise in ratios • grid-auto-rows: 2fr; ⚬ when we have many rows and we just want same grid row size to all then we use grid-auto-rows
  • 7. Grid with spanning • Spanning means you'll be using grid design in a combined format • major properties to achieve spanning in grid are: ⚬ grid-column-start , grid-row-start ■ while combining grids it helps to define starting point w.r.t col & rows
  • 8. Grid spanning (cont...) ⚬ grid-column-end, grid-row-end ■ defines the ending of spanning ⚬ grid-column: 1 / span 3; ■ shorthand for col spanning ⚬ grid-row: 1 / span 3; ■ shorthand for row spanning
  • 9. Grid- minmax property • property used here is: ⚬ grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); • It is use full to build responsive layouts where we specify that minimum certain width should be provided and maximum certain width is provided ⚬ It's kind of similar to what we did in media- query
  • 10. Grid Template Area • Why we use it: ⚬ to easily build the layouts area-wise • Uptill now we have seen grid-template-row & grid-template-columns now we are looking into grid-template-area • e.g: ⚬ grid-template-areas: ⚬ 'navbar navbar navbar navbar' ⚬ 'section section section aside' ⚬ 'footer footer footer footer ';
  • 11. grid-area-template (cont...) • grid-area-template must be provided a reference by property named "grid-area" inside any applied selector: ⚬ e.g: ■ #navbar { ■ grid-area: navbar; ■ } ■ #section { ■ grid-area: section; ■ } ■ #aside { ■ grid-area: aside; ■ } ■ footer { ■ grid-area: footer; ■ }
  • 12. Grid with media query Please lets code instead !!
  • 14. JavaScript (What, When, How, Why) • What: ⚬ JavaScript is a scripting or programming language that allows you to implement complex features on web pages • When ⚬ If you want to implement some logic to your website then you use JS
  • 15. • "JavaScript" is everywhere ⚬ It means doesn't matter its web development or mobile development or in IOT or on server side , ■ JavaScript can handle everything ⚬ On web it form base for many libraries like React.js on Front-end and Node.js for Backend even Node.js is used in IOT also ⚬ React Native is used for mobile development
  • 16. • Write javascript in HTML is possible via <script> tag • Most developer uses browser's devtool along with its console for debugging and in general while doing development • NOTE: JavaScript is way more advance then any other equally aged language like Java, CPP or C • Best combination in market is of MERN stack ⚬ Mongo-Express-React-Node
  • 17. Datatypes & operators • JS has 7 types of datatypes only : ⚬ Number (x= 90) ⚬ String (x="hello world") ⚬ Boolean (x=true, y=false) ⚬ Object (x={first_name:"Hello"}) ⚬ undefined (x=undefined) ⚬ null (x=null) ⚬ array (x=[])
  • 18. Important links for datatypes in JS are: • https://www.w3schools.com/js/js_datatypes.asp • https://www.programiz.com/javascript/data-types • primitive data types: ⚬ String, Number, Boolean, undefined & null • reference or special or composite datatyes: ⚬ Array, Object and Functions
  • 19. Operators in JS • Following are the types of operators in JS ⚬ Assignment Operators ⚬ Arithmetic Operators ⚬ Comparison Operators ⚬ Logical Operators ⚬ Bitwise Operators ⚬ String Operators ⚬ Some special kind of Operators • Lets jump to : ⚬ https://www.programiz.com/javascript/operators
  • 20. Object in JavaScript • Almost everything in JavaScript is either is object or Primitives. • Object form base for, function or class or Number or Boolean or Date or Math or RegX or Array , etc.. • e.g: ⚬ let person = {firstName:"John", lastName:"Doe", age:50, eyeColor:"blue"};
  • 21. How to create an object in JS: • Using object literal ⚬ const person = {firstName:"John", lastName:"Doe", age:50, eyeColor:"blue"}; • Using new keyword ⚬ const person = new Object(); ⚬ person.firstName = "John"; ⚬ person.lastName = "Doe"; ⚬ person.age = 50; ⚬ person.eyeColor = "blue";
  • 22. • Define an object constructor, and then create objects of the constructed type. ⚬ function Person(first, last, age, eye) { ⚬ this.firstName = first; ⚬ this.lastName = last; ⚬ this.age = age; ⚬ this.eyeColor = eye; ⚬ } • https://www.w3schools.com/js/js_object_constructo rs.asp
  • 23. • Create an object using Object.create() ⚬ var foo = new Foo(); ⚬ var foo = Object.create(Foo.prototype); Interview Question: • Difference between new and Object.create ⚬ https://stackoverflow.com/questions/41 66616/understanding-the-difference- between-object-create-and-new- somefunction
  • 24. Arrays in JavaScript • 1-D arrays ⚬ const x = ['a', 1, false, -22] • 2-D array: ⚬ const x = [[1,2], [2,3],67] Question: • const x = [1,2] + [2,3] • const y = [[1,2],'90',[34]] + [[2,3],[5,5]]
  • 25. Strings in JS • const x = "a" • const x1 = "aaaaa" • const y = "a" + 121212 • const q = `aapppp${x}${y}`