html5 e css3 - 2 | webmaster & webdesigner

20
HTML5 e Css3 [2] Matteo Magni

Upload: matteo-magni

Post on 15-Nov-2014

444 views

Category:

Technology


2 download

DESCRIPTION

Seconda lezione del modulo HTML5 e Css3 del corso per WebMaster & WebDesigner

TRANSCRIPT

Page 1: HTML5 e Css3 - 2 | WebMaster & WebDesigner

HTML5 e Css3 [2]Matteo Magni

Page 2: HTML5 e Css3 - 2 | WebMaster & WebDesigner

Figure figcaption

● Figure viene impiegato per contrassegnare illustrazioni, diagrammi, foto, listati di codice che vengono citati nel testo principale ma senza alterarne il senso. Possono quindi essere tolti e messi in altre sezioni del sito.

● Figcaption serve da didascalia per l'immagine

Page 3: HTML5 e Css3 - 2 | WebMaster & WebDesigner

figure figcaption

<figure>

  <img src="/macaque.jpg" alt="Macaque in the trees">

  <figcaption>A cheeky macaque, Lower Kintaganban River, Borneo. Original by <a href="http://www.flickr.com/photos/rclark/">Richard Clark</a></figcaption>

</figure>

Page 4: HTML5 e Css3 - 2 | WebMaster & WebDesigner

<figure>

  <img src="/kookaburra.jpg" alt="Kooaburra">

  <img src="/pelican.jpg" alt="Pelican stood on the beach">

  <img src="/lorikeet.jpg" alt="Cheeky looking Rainbow Lorikeet">

  <figcaption>Australian Birds. From left to right, Kookburra, Pelican and Rainbow Lorikeet. Originals by <a href="http://www.flickr.com/photos/rclark/">Richard Clark</a></figcaption>

</figure>

Più immaginihttp://html5doctor.com/the-figure-figcaption-elements/

Page 5: HTML5 e Css3 - 2 | WebMaster & WebDesigner

hgroup

● L'elemento che raggruppa due o più intestazioni successive

<hgroup>

        <h1>Pippo.com</h1>

        <h2>Pippo il bracco più famoso del mondo </h2>

</hgroup>

Page 6: HTML5 e Css3 - 2 | WebMaster & WebDesigner

hgroup

● Lo scopo nel caso di prima sarebbe non far interferire l'h2 con gli altri h2 del documento che potrebbero servire per definire uno schema logico.

● Nel nostro caso l'h2 è più che altro un sottotitolo.

Page 7: HTML5 e Css3 - 2 | WebMaster & WebDesigner

time

● L'elemento fornisce una versione della data leggibile per l'uomo ed una leggibile per le “macchine”

<time datetime="2007­08­29T13:58Z">

August 29th, 2007 at 13:58

</time>

//l'attributo datetime è opzionale, nel caso si userà la stringa data

Page 8: HTML5 e Css3 - 2 | WebMaster & WebDesigner

Le macchine ci controlleranno?

Page 9: HTML5 e Css3 - 2 | WebMaster & WebDesigner

Progress

● L'elemeno progress rappresenta il grado di avanzamento di una operazione

<section>

 <p>Progress: <progress> <span id="p">0</span>% </progress> </p>

 <script>

  var progressBar = document.getElementById('p');

  function updateProgress(newValue) {

        progressBar.textContent = newValue;

  }

</script>

</section>

Page 10: HTML5 e Css3 - 2 | WebMaster & WebDesigner

meter

● Rappresenta una grandezza scalare, esempio il Page Rank

Your PageRank is: <meter> 2 out of 10 </meter>

Page 11: HTML5 e Css3 - 2 | WebMaster & WebDesigner

Address

<address>

 <a href="../People/Raggett/">Dave Raggett</a>,

 <a href="../People/Arnaud/">Arnaud Le Hors</a>,

 contact persons for the <a href="Activity">W3C HTML Activity</a>

</address>

Page 12: HTML5 e Css3 - 2 | WebMaster & WebDesigner

Address

● Gli elementi address rappresentano le informazioni di contatto per l'elemento article o l'elemento antenato più vicino.

● Se questo è l'elemento body, allora le informazioni di contatto si applicano al documento nel suo complesso.

Page 13: HTML5 e Css3 - 2 | WebMaster & WebDesigner

Novità nei vecchi elementi

<a>

The media attribute describes for which media the target document was designed. It is purely advisory. The value must be a valid media query. The default, if the media attribute is omitted, is "all".

Page 14: HTML5 e Css3 - 2 | WebMaster & WebDesigner

<b> e </i>

Page 15: HTML5 e Css3 - 2 | WebMaster & WebDesigner

Davvero?

<b> ed </i> fanno ancora parte delle specifiche

<b class="character">Deckard</b>: <i class="voiceover">The report would be routine retirement of a replicant which didn't make me feel...</i>

Sinceramente sono non mi è chiarissimo perché vadano mantenuti.

Page 16: HTML5 e Css3 - 2 | WebMaster & WebDesigner

Small

● Diventa il tag per le note legali, i diritti d'autore, le piccole note a margine.

<footer>

<address>For more details, contact

<a href="mailto:[email protected]">matteo</a>

</address>

<small> © copyright ilBonzo. </small>

</footer>

Page 17: HTML5 e Css3 - 2 | WebMaster & WebDesigner

menu

<menu type="toolbar">

        <command type="command" disabled label="Save" icon="icons/save.png" onclick="save()">

        <command type="command" disabled label="Publish" icon="icons/pub.png" onclick="publish()">

</menu>

Page 18: HTML5 e Css3 - 2 | WebMaster & WebDesigner

Menu - type

● Context: menu di tipo contestuale (tipo quello che si apre col tasto destro su win)

● Toolbar: menu tipo barra degli strumenti● List: definisce una lista di comandi

Page 19: HTML5 e Css3 - 2 | WebMaster & WebDesigner

command

<menu type="toolbar">

 <command type="radio" radiogroup="alignment" checked="checked"

          label="Left" icon="icons/alL.png" onclick="setAlign('left')">

 <command type="radio" radiogroup="alignment"

          label="Center" icon="icons/alC.png" onclick="setAlign('center')">

 <command type="radio" radiogroup="alignment"

          label="Right" icon="icons/alR.png" onclick="setAlign('right')">

 <hr>

 <command type="command" disabled

          label="Publish" icon="icons/pub.png" onclick="publish()">

</menu>

Page 20: HTML5 e Css3 - 2 | WebMaster & WebDesigner

Domande?

Slide:

http://www.slideshare.net/ilbonzo

Code:

https://github.com/ilbonzo/Cypher

mail:

[email protected]