SlideShare ist ein Scribd-Unternehmen logo
1 von 14
Downloaden Sie, um offline zu lesen
HTML5 & CSS3
AN INTRODUCTION
1
Why HTML5?
HTML5
+
CSS3
+
Javascript
2
Semantic Syntax
with
Modern Styling
for
Better Interaction
 Semantic Tags
 New form elements & attributes
 CSS Selectors
 CSS Box model
 Responsive vs Adaptive Web Design
 Media Queries
 Web Storage
3
Not covered :
• Media tags – audio, video
• Canvas
• Geolocation
• Drag and drop
• Web workers
Semantic Tags
 Literally means ‘relating to’
 Describes the content to both the developer and the
browser
 Non semantic elements – div, span
 Described using ID and classes
 Header, footer, nav, article, section, aside, figure &
figcaption
 Example
4
5<header> defines the header of the document/ article/ section
<nav> defines the navigation links
<article> defines the primary content
<section> defines the sections
<aside> defines the
extra content
<footer> defines the footer of the document/ article/ section
Form elements
 Existing – text, password, radio button, checkbox, select,
button, file
 New tags –
 date, datetime, month, time , week
 email, number, range, search, tel, url
 Color, datalist
 Example
6
Cascading Style Sheets 7
 CSS Rule
 Selectors
 Box Model
 Display and Visibility
CSS Selectors
 Element selector – div, p
 Class selector - .className
 ID selector – #id
 Attribute selectors – input[type=“text”]
 Pseudo-selectors - :valid, :checked
 Quiz!
8
CSS Box model 9
Display and visibility
div {
display: inline; /* default, takes content width, no line breaks*/
display: inline-block; /* Characteristics of block, but sits on a line */
display: block; /* full width, line break before and after*/
display: none; /* Hide */ [visibility: hidden]
}
Others : Run-in, table, flex
10
Responsive vs Adaptive Web
Design
11
 RWD
 relies on flexible and fluid grids
 Changes with browser
 Content breaks apart & realigns
 AWD
 relies on predefined screen sizes.
 predefined sizes called breakpoints when different layouts are triggered
 Controlled by media queries
Responsive VS Adaptive
Media Query
@media not|only mediatype and (media feature) {
CSS-Code;
}
 Media Type
 Screen, print, handheld, all, etc.
 Media feature
 Width, height
 mi/n/max-device-width/height
 Aspect ratio
 Orientation, etc.
12
Media Query implementation
<!-- CSS media query on a link element -->
<link rel="stylesheet" media="(max-width: 800px)" href="example.css" />
<!-- CSS media query within a stylesheet -->
<style>
@media (max-width: 600px) {
selector{
display: none;
}
}
</style>
Example
13
Web Storage
 Store data in browser
 Client side key-value pairing
 Localstorage
 Persistent across sessions
 localStorage.setItem("localKey", "localValue");
 localStorage.getItem("localKey ");
 Session storage
 Lost at the end of session
 When browser is closed, data stored is lost
 sessionStorage.sessionKey="sessionValue"
 sessionStorage.sessionKey
14

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (18)

The Dark Arts of CSS
The Dark Arts of CSSThe Dark Arts of CSS
The Dark Arts of CSS
 
html & css
html & css html & css
html & css
 
Web forms and html (lect 5)
Web forms and html (lect 5)Web forms and html (lect 5)
Web forms and html (lect 5)
 
WEBD 162: Intro to CSS
WEBD 162: Intro to CSSWEBD 162: Intro to CSS
WEBD 162: Intro to CSS
 
Semantic ui
Semantic uiSemantic ui
Semantic ui
 
Drupal Training
Drupal TrainingDrupal Training
Drupal Training
 
Lecture6 web design and development
Lecture6 web design and developmentLecture6 web design and development
Lecture6 web design and development
 
Organize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS TricksOrganize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS Tricks
 
Html n CSS
Html n CSSHtml n CSS
Html n CSS
 
Unit iii css and javascript 1
Unit iii css and javascript 1Unit iii css and javascript 1
Unit iii css and javascript 1
 
HTML and CSS
HTML and CSSHTML and CSS
HTML and CSS
 
Introduction css
Introduction cssIntroduction css
Introduction css
 
CSS
CSSCSS
CSS
 
Web development using HTML and CSS
Web development using HTML and CSSWeb development using HTML and CSS
Web development using HTML and CSS
 
CSS
CSSCSS
CSS
 
Page layouts flexible and fixed layout with CSS
Page layouts flexible and fixed layout with CSSPage layouts flexible and fixed layout with CSS
Page layouts flexible and fixed layout with CSS
 
WebsiteStructure
WebsiteStructureWebsiteStructure
WebsiteStructure
 
Media queries and frameworks
Media queries and frameworksMedia queries and frameworks
Media queries and frameworks
 

Ähnlich wie Introduction to HTML5 and CSS3

Introduction to html & css
Introduction to html & cssIntroduction to html & css
Introduction to html & csssesharao puvvada
 
Using Tailwind Shadow: An Easy Guide to Custom Shadows - Blogs
Using Tailwind Shadow: An Easy Guide to Custom Shadows - BlogsUsing Tailwind Shadow: An Easy Guide to Custom Shadows - Blogs
Using Tailwind Shadow: An Easy Guide to Custom Shadows - BlogsRonDosh
 
Use Tailwind Select for Easy and Reliable Dropdowns - Blogs
Use Tailwind Select for Easy and Reliable Dropdowns - BlogsUse Tailwind Select for Easy and Reliable Dropdowns - Blogs
Use Tailwind Select for Easy and Reliable Dropdowns - BlogsRonDosh
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3Doris Chen
 
A Complete Guide to Frontend - UI Developer
A Complete Guide to Frontend - UI DeveloperA Complete Guide to Frontend - UI Developer
A Complete Guide to Frontend - UI Developernariyaravi
 
Digibury: Getting your web presence mobile ready - David Walker
Digibury: Getting your web presence mobile ready - David WalkerDigibury: Getting your web presence mobile ready - David Walker
Digibury: Getting your web presence mobile ready - David WalkerLizzie Hodgson
 
Optimizing Sites for Mobile Devices
Optimizing Sites for Mobile DevicesOptimizing Sites for Mobile Devices
Optimizing Sites for Mobile Devicesjameswillweb
 
Responsive Web Designed for your communication and marketing needs
Responsive Web Designed for your communication and marketing needsResponsive Web Designed for your communication and marketing needs
Responsive Web Designed for your communication and marketing needsSEGIC
 
Responsive Web Design - What You Need to Know to Get Started
Responsive Web Design - What You Need to Know to Get StartedResponsive Web Design - What You Need to Know to Get Started
Responsive Web Design - What You Need to Know to Get Startedjennybchicken
 
Responsive web designing ppt(1)
Responsive web designing ppt(1)Responsive web designing ppt(1)
Responsive web designing ppt(1)admecindia1
 
Responsive Web Design & APEX Theme 25
Responsive Web Design & APEX Theme 25Responsive Web Design & APEX Theme 25
Responsive Web Design & APEX Theme 25Christian Rokitta
 
CSS Methodology
CSS MethodologyCSS Methodology
CSS MethodologyZohar Arad
 
A practical guide to building websites with HTML5 & CSS3
A practical guide to building websites with HTML5 & CSS3A practical guide to building websites with HTML5 & CSS3
A practical guide to building websites with HTML5 & CSS3Darren Wood
 
New Css style
New Css styleNew Css style
New Css styleBUDNET
 
The Future Of Digital Layout - Cutting Edge CSS Features
The Future Of Digital Layout - Cutting Edge CSS FeaturesThe Future Of Digital Layout - Cutting Edge CSS Features
The Future Of Digital Layout - Cutting Edge CSS FeaturesAndre JAY Meissner
 
Webpage style with CSS
Webpage style with CSSWebpage style with CSS
Webpage style with CSSHemant Patidar
 

Ähnlich wie Introduction to HTML5 and CSS3 (20)

Introduction to html & css
Introduction to html & cssIntroduction to html & css
Introduction to html & css
 
Using Tailwind Shadow: An Easy Guide to Custom Shadows - Blogs
Using Tailwind Shadow: An Easy Guide to Custom Shadows - BlogsUsing Tailwind Shadow: An Easy Guide to Custom Shadows - Blogs
Using Tailwind Shadow: An Easy Guide to Custom Shadows - Blogs
 
Use Tailwind Select for Easy and Reliable Dropdowns - Blogs
Use Tailwind Select for Easy and Reliable Dropdowns - BlogsUse Tailwind Select for Easy and Reliable Dropdowns - Blogs
Use Tailwind Select for Easy and Reliable Dropdowns - Blogs
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
 
A Complete Guide to Frontend - UI Developer
A Complete Guide to Frontend - UI DeveloperA Complete Guide to Frontend - UI Developer
A Complete Guide to Frontend - UI Developer
 
Digibury: Getting your web presence mobile ready - David Walker
Digibury: Getting your web presence mobile ready - David WalkerDigibury: Getting your web presence mobile ready - David Walker
Digibury: Getting your web presence mobile ready - David Walker
 
Optimizing Sites for Mobile Devices
Optimizing Sites for Mobile DevicesOptimizing Sites for Mobile Devices
Optimizing Sites for Mobile Devices
 
Responsive Web Designed for your communication and marketing needs
Responsive Web Designed for your communication and marketing needsResponsive Web Designed for your communication and marketing needs
Responsive Web Designed for your communication and marketing needs
 
Responsive Web Design - What You Need to Know to Get Started
Responsive Web Design - What You Need to Know to Get StartedResponsive Web Design - What You Need to Know to Get Started
Responsive Web Design - What You Need to Know to Get Started
 
Responsive Web Designing Fundamentals
Responsive Web Designing FundamentalsResponsive Web Designing Fundamentals
Responsive Web Designing Fundamentals
 
Responsive web designing ppt(1)
Responsive web designing ppt(1)Responsive web designing ppt(1)
Responsive web designing ppt(1)
 
Responsive Web Design & APEX Theme 25
Responsive Web Design & APEX Theme 25Responsive Web Design & APEX Theme 25
Responsive Web Design & APEX Theme 25
 
CSS Methodology
CSS MethodologyCSS Methodology
CSS Methodology
 
Css
CssCss
Css
 
Portfolio
PortfolioPortfolio
Portfolio
 
A practical guide to building websites with HTML5 & CSS3
A practical guide to building websites with HTML5 & CSS3A practical guide to building websites with HTML5 & CSS3
A practical guide to building websites with HTML5 & CSS3
 
Html5
Html5Html5
Html5
 
New Css style
New Css styleNew Css style
New Css style
 
The Future Of Digital Layout - Cutting Edge CSS Features
The Future Of Digital Layout - Cutting Edge CSS FeaturesThe Future Of Digital Layout - Cutting Edge CSS Features
The Future Of Digital Layout - Cutting Edge CSS Features
 
Webpage style with CSS
Webpage style with CSSWebpage style with CSS
Webpage style with CSS
 

Kürzlich hochgeladen

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 

Kürzlich hochgeladen (20)

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Introduction to HTML5 and CSS3

  • 1. HTML5 & CSS3 AN INTRODUCTION 1
  • 3.  Semantic Tags  New form elements & attributes  CSS Selectors  CSS Box model  Responsive vs Adaptive Web Design  Media Queries  Web Storage 3 Not covered : • Media tags – audio, video • Canvas • Geolocation • Drag and drop • Web workers
  • 4. Semantic Tags  Literally means ‘relating to’  Describes the content to both the developer and the browser  Non semantic elements – div, span  Described using ID and classes  Header, footer, nav, article, section, aside, figure & figcaption  Example 4
  • 5. 5<header> defines the header of the document/ article/ section <nav> defines the navigation links <article> defines the primary content <section> defines the sections <aside> defines the extra content <footer> defines the footer of the document/ article/ section
  • 6. Form elements  Existing – text, password, radio button, checkbox, select, button, file  New tags –  date, datetime, month, time , week  email, number, range, search, tel, url  Color, datalist  Example 6
  • 7. Cascading Style Sheets 7  CSS Rule  Selectors  Box Model  Display and Visibility
  • 8. CSS Selectors  Element selector – div, p  Class selector - .className  ID selector – #id  Attribute selectors – input[type=“text”]  Pseudo-selectors - :valid, :checked  Quiz! 8
  • 10. Display and visibility div { display: inline; /* default, takes content width, no line breaks*/ display: inline-block; /* Characteristics of block, but sits on a line */ display: block; /* full width, line break before and after*/ display: none; /* Hide */ [visibility: hidden] } Others : Run-in, table, flex 10
  • 11. Responsive vs Adaptive Web Design 11  RWD  relies on flexible and fluid grids  Changes with browser  Content breaks apart & realigns  AWD  relies on predefined screen sizes.  predefined sizes called breakpoints when different layouts are triggered  Controlled by media queries Responsive VS Adaptive
  • 12. Media Query @media not|only mediatype and (media feature) { CSS-Code; }  Media Type  Screen, print, handheld, all, etc.  Media feature  Width, height  mi/n/max-device-width/height  Aspect ratio  Orientation, etc. 12
  • 13. Media Query implementation <!-- CSS media query on a link element --> <link rel="stylesheet" media="(max-width: 800px)" href="example.css" /> <!-- CSS media query within a stylesheet --> <style> @media (max-width: 600px) { selector{ display: none; } } </style> Example 13
  • 14. Web Storage  Store data in browser  Client side key-value pairing  Localstorage  Persistent across sessions  localStorage.setItem("localKey", "localValue");  localStorage.getItem("localKey ");  Session storage  Lost at the end of session  When browser is closed, data stored is lost  sessionStorage.sessionKey="sessionValue"  sessionStorage.sessionKey 14