SlideShare uma empresa Scribd logo
1 de 44
Baixar para ler offline
Sviluppo applicazioni web e linguaggio HTML

                        LEZIONE 01




HTML + CSS
Il World Wide Web è un insieme di contenuti e servizi
              disponibili tramite un accesso internet
Motori di ricerca
Aste on-line
Blog
Enciclopedie
fonte
• Protocollo di rete client/server
   • Contesto di esecuzione: internet o intranet
   • Protocollo applicativo: HTTP
                                                       server
client


                              script: ASP,JSP,PHP...
             HTML
            + CSS +           dati e risorse: file,
                              database, immagini...
           Javascript




                                    Gli attori in gioco
“Navigare in internet”
Come trovo una
pagina su internet?
Attraverso il suo
indirizzo (o URL)…
http://www.google.it/nwshp?hl=it
• Modello request/response
   • Tipo di request: GET, POST, HEAD…
   • Protocollo “stateless”
                                                          server
client      Request
(browser)   GET /default.htm HTTP/1.1
            Host: www.microsoft.com


                             Response
                             HTTP/1.1 200 OK
                             Server: Microsoft-IIS/6.0
                             Content-Type: text/html
                             Content-Lenght: 155
                             <html><body><h1>Hello …




                                            Il protocollo HTTP
browser
Il client conosce
    solo l’HTML

   HyperText Markup Language
fonte
L’HTML spiega al
browser che cosa deve
      visualizzare
Struttura di un documento HTML
       <html>
       <head>




       </body>
       </html>
<???>
lo chiamavano   TAG
< p >
lo chiamavano   paragrafo
< a >
lo chiamavano   anchor (link)
< img >
lo chiamavano   immagine
<       h1             >
lo chiamavano   titolo
<         ul          >
lo chiamavano   lista
< table>

lo chiamavano   tabella
… come si usano?
Esempio di codice HTML
<h1>Questo è un titolo</h1>




             Esempio di codice HTML
<h1>Questo è un titolo</h1>
<p>
 Questo è un paragrafo con un
 <a href="http://www.cgn.it">link</a>.
</p>




                   Esempio di codice HTML
tag di apertura


  <h1>Questo è un titolo</h1>
   <p>
    Questo è un paragrafo con un
    <a href="http://www.cgn.it">link</a>.
   </p>




                      Esempio di codice HTML
tag di apertura             tag di chiusura

  <h1>Questo è un titolo</h1>
   <p>
    Questo è un paragrafo con un
    <a href="http://www.cgn.it">link</a>.
   </p>




                      Esempio di codice HTML
tag di apertura             tag di chiusura

  <h1>Questo è un titolo</h1>
   <p>
    Questo è un paragrafo con un
    <a href="http://www.cgn.it">link</a>.
   </p>
          attributo




                      Esempio di codice HTML
Per un elenco completo dei tag scaricate il cheat sheet da addedbytes.com
Per un elenco completo scaricate il pdf
Mettiamoci un po’ di colore …
I CSS spiegano al
browser come deve
   visualizzare le
    informazioni
(colore, altezza, posizione, carattere,…)
Per identificare un elemento nella
pagina HTML ho bisogno di un selettore
                             html: <h1>titolo</h1>
 1   Nome del TAG            selettore: h1


     ID dell’elemento
 2   (univoco)
                             html: <p id=“intro”>…</p>
                             selettore: #intro


     Classe
 3   dell’elemento
                             html: <p class=“intro”>
                                     …</p>
     (posso averne più di    selettore: .intro
     una per pagina e tag)



                                       Premessa
Struttura di una
 regola di stile
                   commento

selettore {
  /* dichiarazione */
  proprietà: valore;
}
h1 {
  /* titolo in grassetto e
     di colore rosso*/
  color: #FF0000;
  font-weight: bold;
  padding: 15px 0 10px 0;
}
           spaziatura
           (Top Right Bottom Left)
#logo {
  /* immagine con bordi
  e margini personalizzati */
  border: 1px solid #0000FF;
  margin: 10px;
}                    RedGreenBlue
pseudoclasse


a:hover {
  /* se vado sopra un
     link si colora di rosso */
  color: #FF0000;
}
Per un elenco completo delle regole scaricate il cheat sheet da addedbytes.com
Dove posso specificare le regole?

1   In-linea (direttamente come attributo style)

    All’interno di un tag come questo:
2   <style type=“text/css”>…</style>


    In un file esterno caricato nell’head con:
3   <link rel=“stylesheet” type=“text/css” href=“/style.css”/>




                          Come faccio ad usarli?
Il browser ha però degli stili predefiniti, è buona
    norma definire una regola per rimuoverli:

/* v1.0 | 20080212 */

html, body, div, span, applet, object, iframe, h1, h2, h3, h4,
h5, h6, p, blockquote, pre, a, abbr, acronym, address, big,
cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var, b, u, i, center, dl,
dt, dd, ol, ul, li, fieldset, form, label, legend, table,
caption, tbody, tfoot, thead, tr, th, td {
       margin: 0;
       padding: 0;
       border: 0;
       outline: 0;
       font-size: 100%;
       vertical-align: baseline;
       background: transparent;
}


                                                 Reset CSS
# regole
Selettore                  in linea
                                        # of ID   #of CLASS   # of TAG Specificità


LI                       0              0         0           1           0,0,0,1
UL LI                    0              0         0           2           0,0,0,2
DIV UL LI                0              0         0           3           0,0,0,3
DIV UL .LIclass          0              0         1           2           0,0,1,2
#myLI                    0              1         0           0           0,1,0,0
<li style="color:red">   1              0         0           0           1,0,0,0



NOTA: a parità di specificità prevale l’ultima regola



                                      Perché sono “Cascading”?
Credits
Le immagini contenute in questa presentazione
hanno licenza Creative Commons


Slide 2 : http://www.flickr.com/photos/96745290@N00/54371294/
Slide 9 : http://www.flickr.com/photos/sbh/4826181212/in/photostream/
Slide 16 : http://www.flickr.com/photos/pisosantacruz/414375220/
Slide 32 : http://www.flickr.com/photos/anieto2k/5498808099/in/photostream/
Thank You   MANUEL SCAPOLAN
            website: www.manuelscapolan.it
            twitter: manuelscapolan
            e-mail: info@manuelscapolan.it

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

HTML & CSS Masterclass
HTML & CSS MasterclassHTML & CSS Masterclass
HTML & CSS Masterclass
 
HTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts BasicsHTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts Basics
 
Cascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) helpCascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) help
 
1 03 - CSS Introduction
1 03 - CSS Introduction1 03 - CSS Introduction
1 03 - CSS Introduction
 
Introduction to css & its attributes with syntax
Introduction to css & its attributes with syntaxIntroduction to css & its attributes with syntax
Introduction to css & its attributes with syntax
 
HTML - Primi Passi
HTML - Primi PassiHTML - Primi Passi
HTML - Primi Passi
 
CSS
CSSCSS
CSS
 
HTML
HTMLHTML
HTML
 
JavaScript Basics
JavaScript BasicsJavaScript Basics
JavaScript Basics
 
Html, CSS & Web Designing
Html, CSS & Web DesigningHtml, CSS & Web Designing
Html, CSS & Web Designing
 
Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01
 
Basic Html Knowledge for students
Basic Html Knowledge for studentsBasic Html Knowledge for students
Basic Html Knowledge for students
 
Html ppt
Html pptHtml ppt
Html ppt
 
Php
PhpPhp
Php
 
1. HTML
1. HTML1. HTML
1. HTML
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
Html5 tutorial for beginners
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginners
 
HTML
HTMLHTML
HTML
 
(Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS (Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS
 
Html Ppt
Html PptHtml Ppt
Html Ppt
 

Destaque

HTMLslide html
HTMLslide htmlHTMLslide html
HTMLslide htmlritalerede
 
HTML5 e Css3 - 3 | WebMaster & WebDesigner
HTML5 e Css3 - 3 | WebMaster & WebDesignerHTML5 e Css3 - 3 | WebMaster & WebDesigner
HTML5 e Css3 - 3 | WebMaster & WebDesignerMatteo Magni
 
HTML5 e Css3 - 1 | WebMaster & WebDesigner
HTML5 e Css3 - 1 | WebMaster & WebDesignerHTML5 e Css3 - 1 | WebMaster & WebDesigner
HTML5 e Css3 - 1 | WebMaster & WebDesignerMatteo Magni
 
HTML5 e Css3 - 4 | WebMaster & WebDesigner
HTML5 e Css3 - 4 | WebMaster & WebDesignerHTML5 e Css3 - 4 | WebMaster & WebDesigner
HTML5 e Css3 - 4 | WebMaster & WebDesignerMatteo Magni
 
Html5 e css3 nuovi strumenti per un nuovo web
Html5 e css3 nuovi strumenti per un nuovo webHtml5 e css3 nuovi strumenti per un nuovo web
Html5 e css3 nuovi strumenti per un nuovo webMassimo Bonanni
 
HTML5, CSS3 e JavaScript: Web app per tutti gli schermi by Marco Casario
HTML5, CSS3 e JavaScript: Web app per tutti gli schermi by Marco CasarioHTML5, CSS3 e JavaScript: Web app per tutti gli schermi by Marco Casario
HTML5, CSS3 e JavaScript: Web app per tutti gli schermi by Marco CasarioCodemotion
 
Html e Css - 3 | WebMaster & WebDesigner
Html e Css - 3 | WebMaster & WebDesignerHtml e Css - 3 | WebMaster & WebDesigner
Html e Css - 3 | WebMaster & WebDesignerMatteo Magni
 
Guida introduttiva al codice HTML
Guida introduttiva al codice HTMLGuida introduttiva al codice HTML
Guida introduttiva al codice HTMLEnrico Mainero
 
Tutte le novità di ASP.NET MVC3
Tutte le novità di ASP.NET MVC3Tutte le novità di ASP.NET MVC3
Tutte le novità di ASP.NET MVC3Manuel Scapolan
 
C# e la Framework Class Library
C# e la Framework Class LibraryC# e la Framework Class Library
C# e la Framework Class LibraryManuel Scapolan
 
Managed Extensibility Framework (MEF)
Managed Extensibility Framework (MEF)Managed Extensibility Framework (MEF)
Managed Extensibility Framework (MEF)Manuel Scapolan
 
Dai delegati a LINQ con C#
Dai delegati a LINQ con C#Dai delegati a LINQ con C#
Dai delegati a LINQ con C#Manuel Scapolan
 
AntiPatterns: i vizi del programmatore
AntiPatterns: i vizi del programmatoreAntiPatterns: i vizi del programmatore
AntiPatterns: i vizi del programmatoreManuel Scapolan
 
JavaScript Object Oriented
JavaScript Object OrientedJavaScript Object Oriented
JavaScript Object OrientedManuel Scapolan
 
TFS and Scrum - Lessons Learned
TFS and Scrum - Lessons LearnedTFS and Scrum - Lessons Learned
TFS and Scrum - Lessons LearnedManuel Scapolan
 
Domain Driven Design e CQRS
Domain Driven Design e CQRSDomain Driven Design e CQRS
Domain Driven Design e CQRSManuel Scapolan
 

Destaque (20)

HTMLslide html
HTMLslide htmlHTMLslide html
HTMLslide html
 
HTML5 e Css3 - 3 | WebMaster & WebDesigner
HTML5 e Css3 - 3 | WebMaster & WebDesignerHTML5 e Css3 - 3 | WebMaster & WebDesigner
HTML5 e Css3 - 3 | WebMaster & WebDesigner
 
HTML5 e Css3 - 1 | WebMaster & WebDesigner
HTML5 e Css3 - 1 | WebMaster & WebDesignerHTML5 e Css3 - 1 | WebMaster & WebDesigner
HTML5 e Css3 - 1 | WebMaster & WebDesigner
 
HTML5 e Css3 - 4 | WebMaster & WebDesigner
HTML5 e Css3 - 4 | WebMaster & WebDesignerHTML5 e Css3 - 4 | WebMaster & WebDesigner
HTML5 e Css3 - 4 | WebMaster & WebDesigner
 
Html5 e css3 nuovi strumenti per un nuovo web
Html5 e css3 nuovi strumenti per un nuovo webHtml5 e css3 nuovi strumenti per un nuovo web
Html5 e css3 nuovi strumenti per un nuovo web
 
HTML5, CSS3 e JavaScript: Web app per tutti gli schermi by Marco Casario
HTML5, CSS3 e JavaScript: Web app per tutti gli schermi by Marco CasarioHTML5, CSS3 e JavaScript: Web app per tutti gli schermi by Marco Casario
HTML5, CSS3 e JavaScript: Web app per tutti gli schermi by Marco Casario
 
Html e Css - 3 | WebMaster & WebDesigner
Html e Css - 3 | WebMaster & WebDesignerHtml e Css - 3 | WebMaster & WebDesigner
Html e Css - 3 | WebMaster & WebDesigner
 
Html5 - Un anno dopo
Html5 - Un anno dopoHtml5 - Un anno dopo
Html5 - Un anno dopo
 
Guida introduttiva al codice HTML
Guida introduttiva al codice HTMLGuida introduttiva al codice HTML
Guida introduttiva al codice HTML
 
Html
HtmlHtml
Html
 
Tutte le novità di ASP.NET MVC3
Tutte le novità di ASP.NET MVC3Tutte le novità di ASP.NET MVC3
Tutte le novità di ASP.NET MVC3
 
C# e la Framework Class Library
C# e la Framework Class LibraryC# e la Framework Class Library
C# e la Framework Class Library
 
Managed Extensibility Framework (MEF)
Managed Extensibility Framework (MEF)Managed Extensibility Framework (MEF)
Managed Extensibility Framework (MEF)
 
Dai delegati a LINQ con C#
Dai delegati a LINQ con C#Dai delegati a LINQ con C#
Dai delegati a LINQ con C#
 
AntiPatterns: i vizi del programmatore
AntiPatterns: i vizi del programmatoreAntiPatterns: i vizi del programmatore
AntiPatterns: i vizi del programmatore
 
JavaScript Object Oriented
JavaScript Object OrientedJavaScript Object Oriented
JavaScript Object Oriented
 
JavaScript
JavaScriptJavaScript
JavaScript
 
TFS and Scrum - Lessons Learned
TFS and Scrum - Lessons LearnedTFS and Scrum - Lessons Learned
TFS and Scrum - Lessons Learned
 
Knockout.js
Knockout.jsKnockout.js
Knockout.js
 
Domain Driven Design e CQRS
Domain Driven Design e CQRSDomain Driven Design e CQRS
Domain Driven Design e CQRS
 

Semelhante a HTML e CSS

Html e Css - 2 | WebMaster & WebDesigner
 Html e Css - 2 | WebMaster & WebDesigner Html e Css - 2 | WebMaster & WebDesigner
Html e Css - 2 | WebMaster & WebDesignerMatteo Magni
 
Html e Css - 2 | WebMaster & WebDesigner
Html e Css - 2 | WebMaster & WebDesignerHtml e Css - 2 | WebMaster & WebDesigner
Html e Css - 2 | WebMaster & WebDesignerMatteo Magni
 
Breve introduzione alle tecnologie HTML5 + (DOM) + CSS
Breve introduzione alle tecnologie HTML5 + (DOM) + CSS Breve introduzione alle tecnologie HTML5 + (DOM) + CSS
Breve introduzione alle tecnologie HTML5 + (DOM) + CSS Giuseppe Vizzari
 
Presentazione Corso - Parte 1
Presentazione Corso - Parte 1Presentazione Corso - Parte 1
Presentazione Corso - Parte 1Giorgio Carpoca
 
CSS corso base (classi seconde, mod 1)
CSS corso base (classi seconde, mod 1)CSS corso base (classi seconde, mod 1)
CSS corso base (classi seconde, mod 1)Matteo Ziviani
 
Matteo Bicocchi - Introducing HTML5
Matteo Bicocchi - Introducing HTML5Matteo Bicocchi - Introducing HTML5
Matteo Bicocchi - Introducing HTML5Pietro Polsinelli
 
Best practices per lo sviluppo Frontend
Best practices per lo sviluppo FrontendBest practices per lo sviluppo Frontend
Best practices per lo sviluppo FrontendCristiano Rastelli
 
Ancora anatomia, le pagine HTML(5)
Ancora anatomia, le pagine HTML(5)Ancora anatomia, le pagine HTML(5)
Ancora anatomia, le pagine HTML(5)nois3lab
 
Corso HTML per l'editoria
Corso HTML per l'editoriaCorso HTML per l'editoria
Corso HTML per l'editoriaDiego La Monica
 
Html e Css - 1 | WebMaster & WebDesigner
Html e Css - 1 | WebMaster & WebDesigner Html e Css - 1 | WebMaster & WebDesigner
Html e Css - 1 | WebMaster & WebDesigner Matteo Magni
 
Introduzione a jQuery
Introduzione a jQueryIntroduzione a jQuery
Introduzione a jQuerySandro Marcon
 
Lab Web Prof.Di Blasi 2008
Lab Web Prof.Di Blasi 2008Lab Web Prof.Di Blasi 2008
Lab Web Prof.Di Blasi 2008ninam87
 
Lab Web Prof.Di Blasi 2008
Lab Web Prof.Di Blasi 2008Lab Web Prof.Di Blasi 2008
Lab Web Prof.Di Blasi 2008alexzaffi86
 
I Linguaggi Del Web (1° Giornata)
I Linguaggi Del Web (1° Giornata)I Linguaggi Del Web (1° Giornata)
I Linguaggi Del Web (1° Giornata)Diego La Monica
 

Semelhante a HTML e CSS (20)

Html e Css - 2 | WebMaster & WebDesigner
 Html e Css - 2 | WebMaster & WebDesigner Html e Css - 2 | WebMaster & WebDesigner
Html e Css - 2 | WebMaster & WebDesigner
 
Html e Css - 2 | WebMaster & WebDesigner
Html e Css - 2 | WebMaster & WebDesignerHtml e Css - 2 | WebMaster & WebDesigner
Html e Css - 2 | WebMaster & WebDesigner
 
Breve introduzione alle tecnologie HTML5 + (DOM) + CSS
Breve introduzione alle tecnologie HTML5 + (DOM) + CSS Breve introduzione alle tecnologie HTML5 + (DOM) + CSS
Breve introduzione alle tecnologie HTML5 + (DOM) + CSS
 
HTML (+ DOM) + CSS
HTML (+ DOM) + CSSHTML (+ DOM) + CSS
HTML (+ DOM) + CSS
 
Presentazione Corso - Parte 1
Presentazione Corso - Parte 1Presentazione Corso - Parte 1
Presentazione Corso - Parte 1
 
CSS corso base (classi seconde, mod 1)
CSS corso base (classi seconde, mod 1)CSS corso base (classi seconde, mod 1)
CSS corso base (classi seconde, mod 1)
 
Matteo Bicocchi - Introducing HTML5
Matteo Bicocchi - Introducing HTML5Matteo Bicocchi - Introducing HTML5
Matteo Bicocchi - Introducing HTML5
 
Dal Click Al Web Server
Dal Click Al Web ServerDal Click Al Web Server
Dal Click Al Web Server
 
Introduzione ai css
Introduzione ai cssIntroduzione ai css
Introduzione ai css
 
Lezione HTML
Lezione HTMLLezione HTML
Lezione HTML
 
Best practices per lo sviluppo Frontend
Best practices per lo sviluppo FrontendBest practices per lo sviluppo Frontend
Best practices per lo sviluppo Frontend
 
Ancora anatomia, le pagine HTML(5)
Ancora anatomia, le pagine HTML(5)Ancora anatomia, le pagine HTML(5)
Ancora anatomia, le pagine HTML(5)
 
Corso HTML per l'editoria
Corso HTML per l'editoriaCorso HTML per l'editoria
Corso HTML per l'editoria
 
HTML5
HTML5HTML5
HTML5
 
Web writing 2
Web writing 2Web writing 2
Web writing 2
 
Html e Css - 1 | WebMaster & WebDesigner
Html e Css - 1 | WebMaster & WebDesigner Html e Css - 1 | WebMaster & WebDesigner
Html e Css - 1 | WebMaster & WebDesigner
 
Introduzione a jQuery
Introduzione a jQueryIntroduzione a jQuery
Introduzione a jQuery
 
Lab Web Prof.Di Blasi 2008
Lab Web Prof.Di Blasi 2008Lab Web Prof.Di Blasi 2008
Lab Web Prof.Di Blasi 2008
 
Lab Web Prof.Di Blasi 2008
Lab Web Prof.Di Blasi 2008Lab Web Prof.Di Blasi 2008
Lab Web Prof.Di Blasi 2008
 
I Linguaggi Del Web (1° Giornata)
I Linguaggi Del Web (1° Giornata)I Linguaggi Del Web (1° Giornata)
I Linguaggi Del Web (1° Giornata)
 

Mais de Manuel Scapolan

Scrum? E' come fare il bucato!
Scrum? E' come fare il bucato!Scrum? E' come fare il bucato!
Scrum? E' come fare il bucato!Manuel Scapolan
 
ASP.NET MVC3 - Tutti i compiti del Controller
ASP.NET MVC3 - Tutti i compiti del ControllerASP.NET MVC3 - Tutti i compiti del Controller
ASP.NET MVC3 - Tutti i compiti del ControllerManuel Scapolan
 
ASP.NET MVC 3 - Trasportare i dati nel Model
ASP.NET MVC 3 - Trasportare i dati nel ModelASP.NET MVC 3 - Trasportare i dati nel Model
ASP.NET MVC 3 - Trasportare i dati nel ModelManuel Scapolan
 
ASP.NET MVC 3 - Presentare i dati nella View
ASP.NET MVC 3 - Presentare i dati nella ViewASP.NET MVC 3 - Presentare i dati nella View
ASP.NET MVC 3 - Presentare i dati nella ViewManuel Scapolan
 
Entity Framework 4.0 vs NHibernate
Entity Framework 4.0 vs NHibernateEntity Framework 4.0 vs NHibernate
Entity Framework 4.0 vs NHibernateManuel Scapolan
 

Mais de Manuel Scapolan (9)

Scrum? E' come fare il bucato!
Scrum? E' come fare il bucato!Scrum? E' come fare il bucato!
Scrum? E' come fare il bucato!
 
NOSQL
NOSQLNOSQL
NOSQL
 
ASP.NET MVC3 - Tutti i compiti del Controller
ASP.NET MVC3 - Tutti i compiti del ControllerASP.NET MVC3 - Tutti i compiti del Controller
ASP.NET MVC3 - Tutti i compiti del Controller
 
ASP.NET MVC 3 - Trasportare i dati nel Model
ASP.NET MVC 3 - Trasportare i dati nel ModelASP.NET MVC 3 - Trasportare i dati nel Model
ASP.NET MVC 3 - Trasportare i dati nel Model
 
ASP.NET MVC 3 - Presentare i dati nella View
ASP.NET MVC 3 - Presentare i dati nella ViewASP.NET MVC 3 - Presentare i dati nella View
ASP.NET MVC 3 - Presentare i dati nella View
 
ASP.NET
ASP.NETASP.NET
ASP.NET
 
ASP.NET MVC Intro
ASP.NET MVC IntroASP.NET MVC Intro
ASP.NET MVC Intro
 
OOP with C#
OOP with C#OOP with C#
OOP with C#
 
Entity Framework 4.0 vs NHibernate
Entity Framework 4.0 vs NHibernateEntity Framework 4.0 vs NHibernate
Entity Framework 4.0 vs NHibernate
 

Último

Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...
Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...
Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...Associazione Digital Days
 
Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...
Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...
Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...Associazione Digital Days
 
Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...
Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...
Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...Associazione Digital Days
 
Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”
Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”
Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”Associazione Digital Days
 
Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...
Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...
Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...Associazione Digital Days
 
Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...
Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...
Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...Associazione Digital Days
 
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...Associazione Digital Days
 
Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...
Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...
Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...Associazione Digital Days
 
Programma Biennale Tecnologia 2024 Torino
Programma Biennale Tecnologia 2024 TorinoProgramma Biennale Tecnologia 2024 Torino
Programma Biennale Tecnologia 2024 TorinoQuotidiano Piemontese
 

Último (9)

Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...
Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...
Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...
 
Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...
Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...
Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...
 
Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...
Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...
Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...
 
Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”
Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”
Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”
 
Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...
Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...
Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...
 
Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...
Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...
Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...
 
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...
 
Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...
Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...
Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...
 
Programma Biennale Tecnologia 2024 Torino
Programma Biennale Tecnologia 2024 TorinoProgramma Biennale Tecnologia 2024 Torino
Programma Biennale Tecnologia 2024 Torino
 

HTML e CSS

  • 1. Sviluppo applicazioni web e linguaggio HTML LEZIONE 01 HTML + CSS
  • 2. Il World Wide Web è un insieme di contenuti e servizi disponibili tramite un accesso internet
  • 8. • Protocollo di rete client/server • Contesto di esecuzione: internet o intranet • Protocollo applicativo: HTTP server client script: ASP,JSP,PHP... HTML + CSS + dati e risorse: file, database, immagini... Javascript Gli attori in gioco
  • 10. Come trovo una pagina su internet?
  • 11. Attraverso il suo indirizzo (o URL)… http://www.google.it/nwshp?hl=it
  • 12. • Modello request/response • Tipo di request: GET, POST, HEAD… • Protocollo “stateless” server client Request (browser) GET /default.htm HTTP/1.1 Host: www.microsoft.com Response HTTP/1.1 200 OK Server: Microsoft-IIS/6.0 Content-Type: text/html Content-Lenght: 155 <html><body><h1>Hello … Il protocollo HTTP
  • 13. browser Il client conosce solo l’HTML HyperText Markup Language
  • 14. fonte
  • 15. L’HTML spiega al browser che cosa deve visualizzare
  • 16. Struttura di un documento HTML <html> <head> </body> </html>
  • 18. < p > lo chiamavano paragrafo
  • 19. < a > lo chiamavano anchor (link)
  • 20. < img > lo chiamavano immagine
  • 21. < h1 > lo chiamavano titolo
  • 22. < ul > lo chiamavano lista
  • 24. … come si usano?
  • 26. <h1>Questo è un titolo</h1> Esempio di codice HTML
  • 27. <h1>Questo è un titolo</h1> <p> Questo è un paragrafo con un <a href="http://www.cgn.it">link</a>. </p> Esempio di codice HTML
  • 28. tag di apertura <h1>Questo è un titolo</h1> <p> Questo è un paragrafo con un <a href="http://www.cgn.it">link</a>. </p> Esempio di codice HTML
  • 29. tag di apertura tag di chiusura <h1>Questo è un titolo</h1> <p> Questo è un paragrafo con un <a href="http://www.cgn.it">link</a>. </p> Esempio di codice HTML
  • 30. tag di apertura tag di chiusura <h1>Questo è un titolo</h1> <p> Questo è un paragrafo con un <a href="http://www.cgn.it">link</a>. </p> attributo Esempio di codice HTML
  • 31. Per un elenco completo dei tag scaricate il cheat sheet da addedbytes.com Per un elenco completo scaricate il pdf
  • 32. Mettiamoci un po’ di colore …
  • 33. I CSS spiegano al browser come deve visualizzare le informazioni (colore, altezza, posizione, carattere,…)
  • 34. Per identificare un elemento nella pagina HTML ho bisogno di un selettore html: <h1>titolo</h1> 1 Nome del TAG selettore: h1 ID dell’elemento 2 (univoco) html: <p id=“intro”>…</p> selettore: #intro Classe 3 dell’elemento html: <p class=“intro”> …</p> (posso averne più di selettore: .intro una per pagina e tag) Premessa
  • 35. Struttura di una regola di stile commento selettore { /* dichiarazione */ proprietà: valore; }
  • 36. h1 { /* titolo in grassetto e di colore rosso*/ color: #FF0000; font-weight: bold; padding: 15px 0 10px 0; } spaziatura (Top Right Bottom Left)
  • 37. #logo { /* immagine con bordi e margini personalizzati */ border: 1px solid #0000FF; margin: 10px; } RedGreenBlue
  • 38. pseudoclasse a:hover { /* se vado sopra un link si colora di rosso */ color: #FF0000; }
  • 39. Per un elenco completo delle regole scaricate il cheat sheet da addedbytes.com
  • 40. Dove posso specificare le regole? 1 In-linea (direttamente come attributo style) All’interno di un tag come questo: 2 <style type=“text/css”>…</style> In un file esterno caricato nell’head con: 3 <link rel=“stylesheet” type=“text/css” href=“/style.css”/> Come faccio ad usarli?
  • 41. Il browser ha però degli stili predefiniti, è buona norma definire una regola per rimuoverli: /* v1.0 | 20080212 */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; } Reset CSS
  • 42. # regole Selettore in linea # of ID #of CLASS # of TAG Specificità LI 0 0 0 1 0,0,0,1 UL LI 0 0 0 2 0,0,0,2 DIV UL LI 0 0 0 3 0,0,0,3 DIV UL .LIclass 0 0 1 2 0,0,1,2 #myLI 0 1 0 0 0,1,0,0 <li style="color:red"> 1 0 0 0 1,0,0,0 NOTA: a parità di specificità prevale l’ultima regola Perché sono “Cascading”?
  • 43. Credits Le immagini contenute in questa presentazione hanno licenza Creative Commons Slide 2 : http://www.flickr.com/photos/96745290@N00/54371294/ Slide 9 : http://www.flickr.com/photos/sbh/4826181212/in/photostream/ Slide 16 : http://www.flickr.com/photos/pisosantacruz/414375220/ Slide 32 : http://www.flickr.com/photos/anieto2k/5498808099/in/photostream/
  • 44. Thank You MANUEL SCAPOLAN website: www.manuelscapolan.it twitter: manuelscapolan e-mail: info@manuelscapolan.it