SlideShare una empresa de Scribd logo
1 de 29
HTML
Introduction to webdesign:
the basic web page
with practice suggestions
Online Publishing
CSS
• Cascading Stylesheets
• To apply layout to a HTML page, in a way that clearly separates
layout from content
• Selectors: indicate to what you want to apply formatting
• Cascading: Styles are inherited
• 3 ways to implement:
• Inline styles
• In the HTML Header
• In a separate CSS file
CSS Selectors
• Any HTML Element
• body
• h1
• p
• a
• li
• …
• id selector: #myparagraph1 #mainimage
• class selector: .citation .french .highlight
CSS Box Model
• The CSS box model is essentially a box that wraps around HTML
elements, and it consists of: margins, borders, padding, and the
actual content.
Example CSS Box Model
• div.ex
• {
• width:220px;
• padding:10px;
• border:5px solid gray;
• margin:0px;
• }
CSS Examples
• Inline styles
• <p style="color:blue;margin-left:20px;">This is a paragraph.</p>
• In Header Element
• <head>
<style type="text/css">
body {background-color:yellow;}
p {color:blue;}
</style>
</head>
<style type="text/css">
body { background-color:#FFD700; font: calibri, sans-serif; }
h1 {margin-bottom:20px;padding: 10px; background-color:#FFA555; font: 32px bold
calibri, sans-serif;}
#container { padding:10px; }
#header { background-color:#FFA500;padding:10px; }
#menu { background-color:#FFE700;height:100%;width:20%;float:left;
padding:10px; }
#content { background-color:#00DDEE;height:100%;width:70%;float:left;
padding:10px; }
p { font: 14px calibri, sans-serif;
.english { color: green; }
.dutch { color: blue; }
</style>
/* unvisited link */
a:link {
color: red;
}
/* visited link */
a:visited {
color: green;
}
/* mouse over link */
a:hover {
color: yellow;
}
/* selected link */
a:active {
color: orange;
}
<body>
<div id="container">
<div id="header">
<h1 >Stylesheet with divisions</h1>
</div>
<div id="menu">
<p><b>Menu</b><br /><br />
<a href="http://www.kuleuven.be">KU leuven</a><br />
<a href="http://www.france.fr">France</a><br />
<a href="http://www.belgium.be">Belgium</a> </p></div>
<div id="content">
<p class="english">Content goes here</p>
<p class="dutch">Inhoud komt hier</p>
</div>
</div>
HTML 5 nav
• <div id="menu">
• <p><b>Menu</b></p>
• <nav>
• <a href="http://www.kuleuven.be">KU leuven</a> |
• <a href="http://www.france.fr">France</a> |
• <a href="http://www.belgium.be">Belgium</a>
• </nav>
• </div>
CSS Examples
• External Stylesheet File (.css)
• Link in HTML:
• <head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
• Stylesheet contents:
• body {background-color:yellow;}
• p {color:blue;}
• a {text-decoration:none;}
• a:link {color:#FF0000;} /* unvisited link */
• a:visited {color:#00FF00;} /* visited link */
Customizing WordPress CSS
• https://en.support.wordpress.com/custom-design/editing-
css/
• https://dailypost.wordpress.com/2013/06/21/css-intro/
• https://dailypost.wordpress.com/2013/08/29/css-matched-
rule-pane/
HTML color codes
• http://www.w3schools.com/colors/colors_picker.asp
• http://htmlcolorcodes.com/color-picker/
Forms
• Forms are an easy way to implement interactivity on a
website
• You need 2 pages (you can combine it in one):
• the actual HTML page with Form elements
• A server-side or client-side script that will parse the form
Form element example
Form Example Code
<form id="form1" name="form1" method="post"
action="processthisform.php">
<p>
<label for="Name">Name</label>
<input type="text" name="Name" id="Name" />
</p>
<p>Study programme:
<select name="Programme" id="Programme">
<option value="1">Master of Arts in Cultural
Studies</option>
<option value="2">Master of Arts in History</option>
<option value="3">Master of Science in Information
Management</option>
</select>
</p>
Form Example Code
<p>Gender: </p>
<p>
<label>
<input type="radio" name="Gender" value="M" id="Gender_0" />
Male</label>
<br />
<label>
<input type="radio" name="Gender" value="F" id="Gender_1" />
Female</label>
<br />
</p>
<p>I wil attend on: </p>
<p>
<label>
<input type="checkbox" name="Attend" value="fri" id="Attend_0" />
Friday</label>
<br />
<label>
<input type="checkbox" name="Attend" value="sat" id="Attend_1" />
Saturday</label>
</p>
Form Example Code
<p>Comments:</p>
<p><textarea name="Comments" id="Comments"
cols="60" rows="5"></textarea>
</p>
<p>
<input type="submit" name="Submit" id="Submit"
value="Submit" />
<br />
</p>
</form>
Form Example Code
<h1>Calculate your BMI</h1>
<form name="myform" action="" method="get">
<p>height<br />
<input type="text" name="height" value="">
<p>weight<br />
<input type="text" name="weight" value="">
<p>
<input type="button" name="button" Value="Click" onClick="testResults(this.form)">
</form>
<p><script language="JavaScript">
function testResults (form) {
var TestVar = eval(form.weight.value) / (eval(form.height.value) / 100);
// document.write ("<p><b>Your bmi: " + TestVar + "</b></p>");
document.getElementById("answer").innerHTML = "<p><b>Your bmi: " + TestVar +
"</b></p>";
}
</script>
<p id="answer"></p>
HTML 5 Datalist
• <form action="action_page.php">
• <input list="browsers" name="browser">
• <datalist id="browsers">
• <option value="Internet Explorer">
• <option value="Firefox">
• <option value="Chrome">
• <option value="Opera">
• <option value="Safari">
• </datalist>
• <input type="submit">
• </form>
HTML 5 Output
• <form action="action_page.php"
oninput="x.value=parseInt(a.value)+parseInt(b.value)">
0
<input type="range" id="a" name="a" value="50">
100 +
<input type="number" id="b" name="b" value="50">
=
<output name="x" for="a b"></output>
<br><br>
<input type="submit">
</form>
HTML 5
• Main features
• Back to HTML
• Semantic elements
• Graphics
• Multimedia
• New API’s
• Obsolete tags removed
• Optimized for Mobile
• Increased importance of JavaScript
• HTML5 Canvas
What you need to learn
• HTML Box Model & CSS
• Understand the HTML DOM
• HTML Forms
• Javascript & jQuery
Some links
• Notepad++
• EasyPHP: http://www.easyphp.org
• http://html5demos.com/file-api
• http://www.sitepoint.com/html5-ajax-file-upload/
Semantic Elements
Graphics
• Canvas
• Drawing graphics on the fly using Javascript
• SVG
• You can now directly define SVG graphics in HTML
Multimedia
• Video tag
• <video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
• Audio tag
• <audio controls>
<source src="horse.ogg" type="audio/ogg">
<source src="horse.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
• Iframe tag for Youtube
• <iframe width="420" height="315"
src="http://www.youtube.com/embed/XGSy3_Czz8k?autoplay=1">
</iframe>
API’s
• HTML Drag & Drop
• Local Storage
• Geolocation

Más contenido relacionado

La actualidad más candente

Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSSdanpaquette
 
Html5 elements-Kip Academy
Html5 elements-Kip AcademyHtml5 elements-Kip Academy
Html5 elements-Kip Academykip academy
 
Web Design Course: CSS lecture 4
Web Design Course: CSS  lecture 4Web Design Course: CSS  lecture 4
Web Design Course: CSS lecture 4Gheyath M. Othman
 
CSS Frameworks
CSS FrameworksCSS Frameworks
CSS FrameworksMike Crabb
 
Web Design Bootcamp - Day1
Web Design Bootcamp - Day1Web Design Bootcamp - Day1
Web Design Bootcamp - Day1Aslam Najeebdeen
 
关于 Html5 那点事
关于 Html5 那点事关于 Html5 那点事
关于 Html5 那点事Sofish Lin
 
Cascading Style Sheets - Part 02
Cascading Style Sheets - Part 02Cascading Style Sheets - Part 02
Cascading Style Sheets - Part 02Hatem Mahmoud
 
Web Design Course: CSS lecture 3
Web Design Course: CSS lecture 3Web Design Course: CSS lecture 3
Web Design Course: CSS lecture 3Gheyath M. Othman
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTMLAmit Tyagi
 
Introduction to Html by Ankitkumar Singh
Introduction to Html by Ankitkumar SinghIntroduction to Html by Ankitkumar Singh
Introduction to Html by Ankitkumar SinghAnkitkumar Singh
 
HTML5 - Just the basics
HTML5 - Just the basicsHTML5 - Just the basics
HTML5 - Just the basicsJames VanDyke
 
iPhone Web Applications: HTML5, CSS3 & dev tips for iPhone development
iPhone Web Applications: HTML5, CSS3 & dev tips for iPhone developmentiPhone Web Applications: HTML5, CSS3 & dev tips for iPhone development
iPhone Web Applications: HTML5, CSS3 & dev tips for iPhone developmentEstelle Weyl
 

La actualidad más candente (19)

CSS Best practice
CSS Best practiceCSS Best practice
CSS Best practice
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
Html5 elements-Kip Academy
Html5 elements-Kip AcademyHtml5 elements-Kip Academy
Html5 elements-Kip Academy
 
Slicing the web
Slicing the webSlicing the web
Slicing the web
 
Web Design Course: CSS lecture 4
Web Design Course: CSS  lecture 4Web Design Course: CSS  lecture 4
Web Design Course: CSS lecture 4
 
Html5 101
Html5 101Html5 101
Html5 101
 
Html5 101
Html5 101Html5 101
Html5 101
 
6. CSS
6. CSS6. CSS
6. CSS
 
CSS Frameworks
CSS FrameworksCSS Frameworks
CSS Frameworks
 
Web Design Bootcamp - Day1
Web Design Bootcamp - Day1Web Design Bootcamp - Day1
Web Design Bootcamp - Day1
 
Bootstrap [part 2]
Bootstrap [part 2]Bootstrap [part 2]
Bootstrap [part 2]
 
关于 Html5 那点事
关于 Html5 那点事关于 Html5 那点事
关于 Html5 那点事
 
HTML5 Essentials
HTML5 EssentialsHTML5 Essentials
HTML5 Essentials
 
Cascading Style Sheets - Part 02
Cascading Style Sheets - Part 02Cascading Style Sheets - Part 02
Cascading Style Sheets - Part 02
 
Web Design Course: CSS lecture 3
Web Design Course: CSS lecture 3Web Design Course: CSS lecture 3
Web Design Course: CSS lecture 3
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
Introduction to Html by Ankitkumar Singh
Introduction to Html by Ankitkumar SinghIntroduction to Html by Ankitkumar Singh
Introduction to Html by Ankitkumar Singh
 
HTML5 - Just the basics
HTML5 - Just the basicsHTML5 - Just the basics
HTML5 - Just the basics
 
iPhone Web Applications: HTML5, CSS3 & dev tips for iPhone development
iPhone Web Applications: HTML5, CSS3 & dev tips for iPhone developmentiPhone Web Applications: HTML5, CSS3 & dev tips for iPhone development
iPhone Web Applications: HTML5, CSS3 & dev tips for iPhone development
 

Destacado

Amen et l'Afnic : Choisir son adresse internet.
Amen et l'Afnic : Choisir son adresse internet.Amen et l'Afnic : Choisir son adresse internet.
Amen et l'Afnic : Choisir son adresse internet.Amen.fr
 
Bien débuter avec une plateforme e-commerce
Bien débuter avec une plateforme e-commerceBien débuter avec une plateforme e-commerce
Bien débuter avec une plateforme e-commerceEnzo
 
IAB European Agency Snapshot Study
IAB European Agency Snapshot StudyIAB European Agency Snapshot Study
IAB European Agency Snapshot Studypolenumerique33
 
Les applications iOS (iPhone & iPad) et Android
Les applications iOS (iPhone & iPad) et AndroidLes applications iOS (iPhone & iPad) et Android
Les applications iOS (iPhone & iPad) et AndroidNeedeo
 
Stratégie Product Listing Ads Google AdWords (2013)
Stratégie Product Listing Ads Google AdWords (2013)Stratégie Product Listing Ads Google AdWords (2013)
Stratégie Product Listing Ads Google AdWords (2013)Damien Marchois
 
Comment choisir son nom de domaine avec Amen
Comment choisir son nom de domaine avec AmenComment choisir son nom de domaine avec Amen
Comment choisir son nom de domaine avec AmenAmen.fr
 
Amen.fr - Afnic Nouveaux GTLD
Amen.fr - Afnic Nouveaux GTLDAmen.fr - Afnic Nouveaux GTLD
Amen.fr - Afnic Nouveaux GTLDAmen.fr
 
Améliorez votre présence en ligne pour attirer vos clients
Améliorez votre présence en ligne pour attirer vos clientsAméliorez votre présence en ligne pour attirer vos clients
Améliorez votre présence en ligne pour attirer vos clientspolenumerique33
 
Amen - Introduction au référencement (SEO)
Amen - Introduction au référencement (SEO)Amen - Introduction au référencement (SEO)
Amen - Introduction au référencement (SEO)Amen.fr
 
Amen.fr - Choisir le nom de domaine le mieux adapté pour votre identité numér...
Amen.fr - Choisir le nom de domaine le mieux adapté pour votre identité numér...Amen.fr - Choisir le nom de domaine le mieux adapté pour votre identité numér...
Amen.fr - Choisir le nom de domaine le mieux adapté pour votre identité numér...Amen.fr
 
présentation wordpress
présentation wordpressprésentation wordpress
présentation wordpressmonsieurpixel
 
Découvrez le nouveau plugin pour la solution ecommerce Shopware
Découvrez le nouveau plugin pour la solution ecommerce ShopwareDécouvrez le nouveau plugin pour la solution ecommerce Shopware
Découvrez le nouveau plugin pour la solution ecommerce ShopwareLengow
 
Conseils et outils gratuits pour démarrer
Conseils et outils gratuits pour démarrer Conseils et outils gratuits pour démarrer
Conseils et outils gratuits pour démarrer Needeo
 
Choisir une adresse internet, quelles sont les questions à se poser?
Choisir une adresse internet, quelles sont les questions à se poser?Choisir une adresse internet, quelles sont les questions à se poser?
Choisir une adresse internet, quelles sont les questions à se poser?Amen.fr
 
I tourisme amen donuts webinar july 15
I tourisme amen donuts webinar july 15I tourisme amen donuts webinar july 15
I tourisme amen donuts webinar july 15Amen.fr
 
Adobe Digital Index "Best of the Best Benchmark 2014"
Adobe Digital Index "Best of the Best Benchmark 2014"Adobe Digital Index "Best of the Best Benchmark 2014"
Adobe Digital Index "Best of the Best Benchmark 2014"polenumerique33
 
Optimisez votre référencement sur Internet pour améliorer la visibilité de vo...
Optimisez votre référencement sur Internet pour améliorer la visibilité de vo...Optimisez votre référencement sur Internet pour améliorer la visibilité de vo...
Optimisez votre référencement sur Internet pour améliorer la visibilité de vo...polenumerique33
 
Optimisez votre Référencement sur Internet pour améliorer la visibilité de v...
Optimisez votre Référencement sur Internet pour améliorer  la visibilité de v...Optimisez votre Référencement sur Internet pour améliorer  la visibilité de v...
Optimisez votre Référencement sur Internet pour améliorer la visibilité de v...polenumerique33
 
Comment travailler sur des projets WordPress pour de gros clients
Comment travailler sur des projets WordPress pour de gros clientsComment travailler sur des projets WordPress pour de gros clients
Comment travailler sur des projets WordPress pour de gros clientsEmilie LEBRUN
 

Destacado (20)

Amen et l'Afnic : Choisir son adresse internet.
Amen et l'Afnic : Choisir son adresse internet.Amen et l'Afnic : Choisir son adresse internet.
Amen et l'Afnic : Choisir son adresse internet.
 
Bien débuter avec une plateforme e-commerce
Bien débuter avec une plateforme e-commerceBien débuter avec une plateforme e-commerce
Bien débuter avec une plateforme e-commerce
 
IAB European Agency Snapshot Study
IAB European Agency Snapshot StudyIAB European Agency Snapshot Study
IAB European Agency Snapshot Study
 
Les applications iOS (iPhone & iPad) et Android
Les applications iOS (iPhone & iPad) et AndroidLes applications iOS (iPhone & iPad) et Android
Les applications iOS (iPhone & iPad) et Android
 
Stratégie Product Listing Ads Google AdWords (2013)
Stratégie Product Listing Ads Google AdWords (2013)Stratégie Product Listing Ads Google AdWords (2013)
Stratégie Product Listing Ads Google AdWords (2013)
 
Comment choisir son nom de domaine avec Amen
Comment choisir son nom de domaine avec AmenComment choisir son nom de domaine avec Amen
Comment choisir son nom de domaine avec Amen
 
Amen.fr - Afnic Nouveaux GTLD
Amen.fr - Afnic Nouveaux GTLDAmen.fr - Afnic Nouveaux GTLD
Amen.fr - Afnic Nouveaux GTLD
 
Améliorez votre présence en ligne pour attirer vos clients
Améliorez votre présence en ligne pour attirer vos clientsAméliorez votre présence en ligne pour attirer vos clients
Améliorez votre présence en ligne pour attirer vos clients
 
Amen - Introduction au référencement (SEO)
Amen - Introduction au référencement (SEO)Amen - Introduction au référencement (SEO)
Amen - Introduction au référencement (SEO)
 
Amen.fr - Choisir le nom de domaine le mieux adapté pour votre identité numér...
Amen.fr - Choisir le nom de domaine le mieux adapté pour votre identité numér...Amen.fr - Choisir le nom de domaine le mieux adapté pour votre identité numér...
Amen.fr - Choisir le nom de domaine le mieux adapté pour votre identité numér...
 
Initiation html css
Initiation html cssInitiation html css
Initiation html css
 
présentation wordpress
présentation wordpressprésentation wordpress
présentation wordpress
 
Découvrez le nouveau plugin pour la solution ecommerce Shopware
Découvrez le nouveau plugin pour la solution ecommerce ShopwareDécouvrez le nouveau plugin pour la solution ecommerce Shopware
Découvrez le nouveau plugin pour la solution ecommerce Shopware
 
Conseils et outils gratuits pour démarrer
Conseils et outils gratuits pour démarrer Conseils et outils gratuits pour démarrer
Conseils et outils gratuits pour démarrer
 
Choisir une adresse internet, quelles sont les questions à se poser?
Choisir une adresse internet, quelles sont les questions à se poser?Choisir une adresse internet, quelles sont les questions à se poser?
Choisir une adresse internet, quelles sont les questions à se poser?
 
I tourisme amen donuts webinar july 15
I tourisme amen donuts webinar july 15I tourisme amen donuts webinar july 15
I tourisme amen donuts webinar july 15
 
Adobe Digital Index "Best of the Best Benchmark 2014"
Adobe Digital Index "Best of the Best Benchmark 2014"Adobe Digital Index "Best of the Best Benchmark 2014"
Adobe Digital Index "Best of the Best Benchmark 2014"
 
Optimisez votre référencement sur Internet pour améliorer la visibilité de vo...
Optimisez votre référencement sur Internet pour améliorer la visibilité de vo...Optimisez votre référencement sur Internet pour améliorer la visibilité de vo...
Optimisez votre référencement sur Internet pour améliorer la visibilité de vo...
 
Optimisez votre Référencement sur Internet pour améliorer la visibilité de v...
Optimisez votre Référencement sur Internet pour améliorer  la visibilité de v...Optimisez votre Référencement sur Internet pour améliorer  la visibilité de v...
Optimisez votre Référencement sur Internet pour améliorer la visibilité de v...
 
Comment travailler sur des projets WordPress pour de gros clients
Comment travailler sur des projets WordPress pour de gros clientsComment travailler sur des projets WordPress pour de gros clients
Comment travailler sur des projets WordPress pour de gros clients
 

Similar a Lecture 03 HTML&CSS Part 2

TOSSUG HTML5 讀書會 新標籤與表單
TOSSUG HTML5 讀書會 新標籤與表單TOSSUG HTML5 讀書會 新標籤與表單
TOSSUG HTML5 讀書會 新標籤與表單偉格 高
 
What you need to know bout html5
What you need to know bout html5What you need to know bout html5
What you need to know bout html5Kevin DeRudder
 
2022 HTML5: The future is now
2022 HTML5: The future is now2022 HTML5: The future is now
2022 HTML5: The future is nowGonzalo Cordero
 
HTML CSS and Web Development
HTML CSS and Web DevelopmentHTML CSS and Web Development
HTML CSS and Web DevelopmentRahul Mishra
 
HTML CSS Best Practices
HTML CSS Best PracticesHTML CSS Best Practices
HTML CSS Best Practiceshoctudau
 
The project gutenberg e book, fairy tales from brazil, by elsie spicer
The project gutenberg e book, fairy tales from brazil, by elsie spicerThe project gutenberg e book, fairy tales from brazil, by elsie spicer
The project gutenberg e book, fairy tales from brazil, by elsie spicerAndrei Hortúa
 
BITM3730 9-12.pptx
BITM3730 9-12.pptxBITM3730 9-12.pptx
BITM3730 9-12.pptxMattMarino13
 
Top 10 HTML5 features every developer should know!
Top 10 HTML5 features every developer should know!Top 10 HTML5 features every developer should know!
Top 10 HTML5 features every developer should know!Gill Cleeren
 
Layout with CSS
Layout with CSSLayout with CSS
Layout with CSSMike Crabb
 
Creating HTML Pages
Creating HTML PagesCreating HTML Pages
Creating HTML PagesMike Crabb
 
Bootstrap 3 Cheat Sheet PDF Reference
Bootstrap 3 Cheat Sheet PDF ReferenceBootstrap 3 Cheat Sheet PDF Reference
Bootstrap 3 Cheat Sheet PDF ReferenceBootstrap Creative
 
Css for Development
Css for DevelopmentCss for Development
Css for Developmenttsengsite
 

Similar a Lecture 03 HTML&CSS Part 2 (20)

TOSSUG HTML5 讀書會 新標籤與表單
TOSSUG HTML5 讀書會 新標籤與表單TOSSUG HTML5 讀書會 新標籤與表單
TOSSUG HTML5 讀書會 新標籤與表單
 
HTML5 & CSS3 Flag
HTML5 & CSS3 FlagHTML5 & CSS3 Flag
HTML5 & CSS3 Flag
 
Lecture 2 - HTML Basics
Lecture 2 - HTML BasicsLecture 2 - HTML Basics
Lecture 2 - HTML Basics
 
What you need to know bout html5
What you need to know bout html5What you need to know bout html5
What you need to know bout html5
 
2022 HTML5: The future is now
2022 HTML5: The future is now2022 HTML5: The future is now
2022 HTML5: The future is now
 
HTML CSS and Web Development
HTML CSS and Web DevelopmentHTML CSS and Web Development
HTML CSS and Web Development
 
HTML CSS Best Practices
HTML CSS Best PracticesHTML CSS Best Practices
HTML CSS Best Practices
 
Html coding
Html codingHtml coding
Html coding
 
The project gutenberg e book, fairy tales from brazil, by elsie spicer
The project gutenberg e book, fairy tales from brazil, by elsie spicerThe project gutenberg e book, fairy tales from brazil, by elsie spicer
The project gutenberg e book, fairy tales from brazil, by elsie spicer
 
BITM3730 9-12.pptx
BITM3730 9-12.pptxBITM3730 9-12.pptx
BITM3730 9-12.pptx
 
HTML5
HTML5HTML5
HTML5
 
Print this
Print thisPrint this
Print this
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
Top 10 HTML5 features every developer should know!
Top 10 HTML5 features every developer should know!Top 10 HTML5 features every developer should know!
Top 10 HTML5 features every developer should know!
 
Layout with CSS
Layout with CSSLayout with CSS
Layout with CSS
 
Layout & css lecture
Layout & css lectureLayout & css lecture
Layout & css lecture
 
[O'Reilly] HTML5 Design
[O'Reilly] HTML5 Design[O'Reilly] HTML5 Design
[O'Reilly] HTML5 Design
 
Creating HTML Pages
Creating HTML PagesCreating HTML Pages
Creating HTML Pages
 
Bootstrap 3 Cheat Sheet PDF Reference
Bootstrap 3 Cheat Sheet PDF ReferenceBootstrap 3 Cheat Sheet PDF Reference
Bootstrap 3 Cheat Sheet PDF Reference
 
Css for Development
Css for DevelopmentCss for Development
Css for Development
 

Último

USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEaurabinda banchhor
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
The Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World PoliticsThe Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World PoliticsRommel Regala
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxTEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxruthvilladarez
 
Presentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxPresentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxRosabel UA
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataBabyAnnMotar
 
EMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxEMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxElton John Embodo
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operationalssuser3e220a
 

Último (20)

USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSE
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
The Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World PoliticsThe Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World Politics
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxTEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docx
 
Presentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxPresentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped data
 
EMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxEMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docx
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operational
 

Lecture 03 HTML&CSS Part 2

  • 1. HTML Introduction to webdesign: the basic web page with practice suggestions Online Publishing
  • 2. CSS • Cascading Stylesheets • To apply layout to a HTML page, in a way that clearly separates layout from content • Selectors: indicate to what you want to apply formatting • Cascading: Styles are inherited • 3 ways to implement: • Inline styles • In the HTML Header • In a separate CSS file
  • 3. CSS Selectors • Any HTML Element • body • h1 • p • a • li • … • id selector: #myparagraph1 #mainimage • class selector: .citation .french .highlight
  • 4. CSS Box Model • The CSS box model is essentially a box that wraps around HTML elements, and it consists of: margins, borders, padding, and the actual content.
  • 5. Example CSS Box Model • div.ex • { • width:220px; • padding:10px; • border:5px solid gray; • margin:0px; • }
  • 6. CSS Examples • Inline styles • <p style="color:blue;margin-left:20px;">This is a paragraph.</p> • In Header Element • <head> <style type="text/css"> body {background-color:yellow;} p {color:blue;} </style> </head>
  • 7. <style type="text/css"> body { background-color:#FFD700; font: calibri, sans-serif; } h1 {margin-bottom:20px;padding: 10px; background-color:#FFA555; font: 32px bold calibri, sans-serif;} #container { padding:10px; } #header { background-color:#FFA500;padding:10px; } #menu { background-color:#FFE700;height:100%;width:20%;float:left; padding:10px; } #content { background-color:#00DDEE;height:100%;width:70%;float:left; padding:10px; } p { font: 14px calibri, sans-serif; .english { color: green; } .dutch { color: blue; } </style>
  • 8. /* unvisited link */ a:link { color: red; } /* visited link */ a:visited { color: green; } /* mouse over link */ a:hover { color: yellow; } /* selected link */ a:active { color: orange; }
  • 9. <body> <div id="container"> <div id="header"> <h1 >Stylesheet with divisions</h1> </div> <div id="menu"> <p><b>Menu</b><br /><br /> <a href="http://www.kuleuven.be">KU leuven</a><br /> <a href="http://www.france.fr">France</a><br /> <a href="http://www.belgium.be">Belgium</a> </p></div> <div id="content"> <p class="english">Content goes here</p> <p class="dutch">Inhoud komt hier</p> </div> </div>
  • 10.
  • 11. HTML 5 nav • <div id="menu"> • <p><b>Menu</b></p> • <nav> • <a href="http://www.kuleuven.be">KU leuven</a> | • <a href="http://www.france.fr">France</a> | • <a href="http://www.belgium.be">Belgium</a> • </nav> • </div>
  • 12. CSS Examples • External Stylesheet File (.css) • Link in HTML: • <head> <link rel="stylesheet" type="text/css" href="mystyle.css"> </head> • Stylesheet contents: • body {background-color:yellow;} • p {color:blue;} • a {text-decoration:none;} • a:link {color:#FF0000;} /* unvisited link */ • a:visited {color:#00FF00;} /* visited link */
  • 13. Customizing WordPress CSS • https://en.support.wordpress.com/custom-design/editing- css/ • https://dailypost.wordpress.com/2013/06/21/css-intro/ • https://dailypost.wordpress.com/2013/08/29/css-matched- rule-pane/
  • 14. HTML color codes • http://www.w3schools.com/colors/colors_picker.asp • http://htmlcolorcodes.com/color-picker/
  • 15. Forms • Forms are an easy way to implement interactivity on a website • You need 2 pages (you can combine it in one): • the actual HTML page with Form elements • A server-side or client-side script that will parse the form
  • 17. Form Example Code <form id="form1" name="form1" method="post" action="processthisform.php"> <p> <label for="Name">Name</label> <input type="text" name="Name" id="Name" /> </p> <p>Study programme: <select name="Programme" id="Programme"> <option value="1">Master of Arts in Cultural Studies</option> <option value="2">Master of Arts in History</option> <option value="3">Master of Science in Information Management</option> </select> </p>
  • 18. Form Example Code <p>Gender: </p> <p> <label> <input type="radio" name="Gender" value="M" id="Gender_0" /> Male</label> <br /> <label> <input type="radio" name="Gender" value="F" id="Gender_1" /> Female</label> <br /> </p> <p>I wil attend on: </p> <p> <label> <input type="checkbox" name="Attend" value="fri" id="Attend_0" /> Friday</label> <br /> <label> <input type="checkbox" name="Attend" value="sat" id="Attend_1" /> Saturday</label> </p>
  • 19. Form Example Code <p>Comments:</p> <p><textarea name="Comments" id="Comments" cols="60" rows="5"></textarea> </p> <p> <input type="submit" name="Submit" id="Submit" value="Submit" /> <br /> </p> </form>
  • 20. Form Example Code <h1>Calculate your BMI</h1> <form name="myform" action="" method="get"> <p>height<br /> <input type="text" name="height" value=""> <p>weight<br /> <input type="text" name="weight" value=""> <p> <input type="button" name="button" Value="Click" onClick="testResults(this.form)"> </form> <p><script language="JavaScript"> function testResults (form) { var TestVar = eval(form.weight.value) / (eval(form.height.value) / 100); // document.write ("<p><b>Your bmi: " + TestVar + "</b></p>"); document.getElementById("answer").innerHTML = "<p><b>Your bmi: " + TestVar + "</b></p>"; } </script> <p id="answer"></p>
  • 21. HTML 5 Datalist • <form action="action_page.php"> • <input list="browsers" name="browser"> • <datalist id="browsers"> • <option value="Internet Explorer"> • <option value="Firefox"> • <option value="Chrome"> • <option value="Opera"> • <option value="Safari"> • </datalist> • <input type="submit"> • </form>
  • 22. HTML 5 Output • <form action="action_page.php" oninput="x.value=parseInt(a.value)+parseInt(b.value)"> 0 <input type="range" id="a" name="a" value="50"> 100 + <input type="number" id="b" name="b" value="50"> = <output name="x" for="a b"></output> <br><br> <input type="submit"> </form>
  • 23. HTML 5 • Main features • Back to HTML • Semantic elements • Graphics • Multimedia • New API’s • Obsolete tags removed • Optimized for Mobile • Increased importance of JavaScript • HTML5 Canvas
  • 24. What you need to learn • HTML Box Model & CSS • Understand the HTML DOM • HTML Forms • Javascript & jQuery
  • 25. Some links • Notepad++ • EasyPHP: http://www.easyphp.org • http://html5demos.com/file-api • http://www.sitepoint.com/html5-ajax-file-upload/
  • 27. Graphics • Canvas • Drawing graphics on the fly using Javascript • SVG • You can now directly define SVG graphics in HTML
  • 28. Multimedia • Video tag • <video width="320" height="240" controls> <source src="movie.mp4" type="video/mp4"> <source src="movie.ogg" type="video/ogg"> Your browser does not support the video tag. </video> • Audio tag • <audio controls> <source src="horse.ogg" type="audio/ogg"> <source src="horse.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> • Iframe tag for Youtube • <iframe width="420" height="315" src="http://www.youtube.com/embed/XGSy3_Czz8k?autoplay=1"> </iframe>
  • 29. API’s • HTML Drag & Drop • Local Storage • Geolocation