SlideShare une entreprise Scribd logo
1  sur  62
Télécharger pour lire hors ligne
SPERIMENTAZIONI DI
 TECNOLOGIE E
 COMUNICAZIONI MULTIMEDIALI

   Lesson 3: BASE HTML & CSS




Salvatore Iaconesi
salvatore.iaconesi@artisopensource.net
This lesson is about
HTML & CSS
The course is not about
HTML & CSS

But we need them to build
our web and mobile experiences
... so here is a large tutorial
   so that we know a little more
   about HTML & CSS


We will use these things in class multiple times!
Please study this tutorial well, so that you'll be able to use your time better in class!

(and don't be afraid about mistakes...
things will turn out to be really easy the third/fourth/fifth time you do them)
HTML = structure of a page

CSS = aesthetics of a page
HTML
In HTML you define structure!

Is this a title?
Is this a paragraph of text?
Is this box a user profile?

Etcetera...

In HTML you don't care if it's green or blue,

you care about what each object MEANS

and about what is the STRUCTURE and ROLE of an
object of a page
HTML is a DOCUMENT!

HTML is what is called a MARKUP LANGUAGE

MARKUP languages describe documents in terms of their

- structures
- links
- relations
- roles

HTML describes the STRUCTURE of a web page
(and, since a little while, of a mobile web page, too)


http://en.wikipedia.org/wiki/Markup_language
http://en.wikipedia.org/wiki/Html
Each document (and, thus, HTML documents) have:


                        META DATA & DATA




   META DATA: describes what is in the document (ex.: title, author, date, keywords)

   DATA: is the content of the document (ex.: text, images, videos, links)
META DATA is disseminated
all over your HTML documents

It is used for various purposes


SEO (Search Engine Optimization)

Internationalization

Access for users with disabilities

Semantic web

And loads more....
SEO (Search Engine Optimization)

It is not acceptable any more to have a website that is not optimized for
search engines.

If your site is not reachable on search engines it does not exist.

Even more: SEO now reaches into Social Networks (Facebook, Twitter...)

The trend is:

“Classical websites (however beautiful and interactive) are progressively
less useful (tending to zero).
Websites today MUST: connect to social networks, establish dialogues,
must be readable or easily translatable by people across languages and
cultures, must be searchable, taggable, aggregatable, indexable.”
Internationalization

You don't need to translate everything, but you NEED to make everything easily
Translatable to your users (for example by using Google Translate services).

In your meta data:

- you need to define the main language of the page
- you need to define the correct character set of the page (UTF-8 if you're not sure)
- you need to use plain, readable text wherever you can
- you need to include meta data even in tags wherever you can

Try avoiding Flash whenever you can
(HTML5 and CSS3 do wonders! Use these if you can)
Access for disabilities

This is how a blind person sees your webpage
Access for disabilities or
education issues
Lots of tools exist nowadays to make the world an enormously better place for
People who can't see, hear, or for people who may be a bit more unlucky than
You are, and maybe they don't know how to read because they didn't have a chance
To go to school for some reason.

You can let all of them experience the beautiful things you do, or the beautiful websites
You will create for your clients. If you just use the right metadata at the right spot.

for example giving nice titles to images, or adding descriptions to the elements of
Your page, or by describing if an element on page is a title or a subtitle, etc.

They will experience a wonderful thing and the world will be much nicer
(and you will also be the first on Google search if you use all this metadata)



  USE YOUR META DATA!
Semantic web

Use meta data to define the roles of the elements on your page.

Automatic systems will be able to read your page and store it correctly
into databases that hold the description of the knowledge on the web

This is the future of how we will access information on the web:

- web content will be indexed semantically
- we will search not for words, but for meanings
- we will find what we want (if the owner of the website remembered to use meta data)


http://en.wikipedia.org/wiki/Semantic_Web
THIS IS THE MOST
    IMPORTANT THING
   ABOUT WEB PAGES!

           :)

IF YOU UNDERSTAND THIS
YOUR LIFE WILL BE EASIER
HOW TO ASSIGN ROLES AND
SEMANTIC TYPES TO THE ELEMENTS
ON YOUR INTERFACES

  It is useful to assign CLASS and/or ID to the elements of your page

  CLASS and ID describe the role of an element in your page

  Role
  ex. of roles: title, first paragraph, image caption, citation, box heading....

  Role represents what the element represents in the structure of the page,
  what is its meaning, its function

  We can use the definition of the role of an element in HTML to describe its
  function in the structure of the page, and then we will use it as a reference
  in CSS to assign its representation (ex.: we will be able to say things like
  “each title has a yellow background”)
CLASS                                       ID
It is a TYPE (a title, a paragraph...)      It is an identity (the THIRD title)

There can be more than one on each page     There can be one of each in a page
(ex.: all the titles shown in the page)     (ex.: there will be only 1 “THIRD title” on
                                            a page)


<div class=”title”>...</div>                <div id=”title-3”>...</div>

You can use same class on multiple          You can use an ID in only one element
Elements

Each element can be of more than            Each element can have only 1 ID
one class

<div class=”title news-section”>...</div>   An element can have both ID and class

                                            <div id=”title-3” class=”title”>...</div>
                                            (this would probably mean that this div
                                            Is a title and that it is exactly the third-title)
WHY DO WE NEED CLASS AND ID?

To define the semantic (meaning) of our pages (so that, for example, Google
can read them and index them properly)

To define style with CSS (through CSS we could say that all titles on our pages
are yellow, but the first one will be also with a red background --> we need
CLASS and ID to do that)

To make our page more active with javascript (for example we could like to have
an animation on all our titles when we enter a page --> we will use CLASS from
Javascript to create the animation; we could want a different one on the first title
alone --> we will use ID in this case)
WHAT IS INSIDE A WEB PAGE?
.... document setup ....
<html>

   <head>


   ... the parts of the heading...


   </head>
   <body>


   .... your content ...


   </body>
</html>
DOCUMENT SETUP
 (you probably will never write these things by hand,
 but it is nice and useful to know what they mean)




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">



   HTML is one of the standards promoted by W3C (World Wide Web Consortium)
   http://w3c.com

   These lines certificate that your document comply with the standards
   VERY IMPORTANT for search engines and compatibility with many browsers
HEADING
 (you probably will never write these things by hand,
 but it is nice and useful to know what they mean)



<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />


It describes the type of content of the page

This format of description of contents in your page is very used and is called mime-type

mime-types describe content in multiple places and are like

type/specific-format

For example:

text/html
image/jpeg
image/png

The second parameter (charset) indicates the type of characters that will be used in
the page. If you don't know, use UTF-8 (an international set with accents etc.)
HEADING


<title>this is the title of my page</title>


It is the title of the web page

Appears on top of browser window

Very important for search engines

For SEO: use keywords in title and try to have the same keywords appear 4 or 5 times
in the body of the page as well
HEADING


<meta name="description" content="a description" />
<meta name="keywords" content="some keywords" />
These two meta tags used to be very important for SEO, but now they are only used
to see if they are coherent with the rest of your page (if you have “barak obama” as
a keyword and “barak obama” is found nowhere in your website, it will result
in a penalty on search engines)

Description should be about 140-160 characters long

Keywords are separated by commas (,) and should be around 6-12

You can use multiple words as keywords (for example “art”, “contemporary art” and
“contemporary art in new york” are all valid keywords)
HEADING


  <link rel="stylesheet" href="style.css" type="text/css" media="screen" />


It is the link to an external style sheet

Try to use external style sheets, so you only write them once and use them in various pages

External stylesheets are good also because they are put in the cache and so page
loading time is better

media parameter can show what this stylesheet is for:
- “screen” will be used for output on monitor
- “print” will be used when you print a webpage
- “all” will be used on all media
There are a lot more values --> look on w3c.com
HTML CONTENT
HTML is made of TAGS:



<div ... > ... some content .... </ div>

<br />
Tags are defined by angular parenthsis and they can surround some content
(as in the first case) or they can be in a single part (as in the second case)


Tags can have parameters, called attributes:

<img src=”...the address of an image...” width=”100” height=”300” />

'width=”100”' is an attribute of the img tag


Tags can contain other tags (as in the first example on top of the slide)
SOME IMPORTANT TAGS
h1,h2,h3,h4,h5,h6




 They are headings, they are used as titles, subtitles, sub-sub-titles etcetera

 H1 should be used only once per page (main title)

 H2 to h6 can be used as many times as you want, best if used in order

 ex.: h4 is subtitle of h3 which is subtitle of h2

 <h2>title</h2
 <h3>sub-title</h3>
 <h4>sub-sub-title</h4>
Ordered (ol) and unordered (ul) lists, and list elements (li)



  Lists are very important and by manipulating them through CSS you can
  do all sorts of things (animated menus, pieces of interfaces...) that are also
  extremely well optimized for SEO purposes

  Unordered lists are bullet points

  <ul>
       <li>I am the first list element</li>
       <li>I am the secondlist element</li>
  </ul>

  Ordered lists are numbered sequences

  <ol>
       <li>i will be element number 1</li>
       <li>i will be element number 2</li>
  </ol>
links



<a href=”...internet address...” target=”_blank” title=”a title for the link”>CLICK</a>


href: the internet address to which the link points

target: where will the link open (_blank opens a new window, _self opens in the
current window, if you specify a name, it opens a window with that name);
it is an optional parameter


title: sets a title for the link; good for SEO
span and div



The span and div tags are used to group things together, so that you can use them in
CSS to create boxes, highlights, position them around the page, animate them etecetera.


span is usually used in-line, for example to group a set of words together if you want
to add a highlight to them

In this sentence <span class=”highlighted-text”>these words are highlighted</span>.



div is a block element, meaning that it represents an area of the screen

<div class=”floater”>I can make the text in this DIV appear all over the page, wit CSS</div>
A SET OF GREAT ADVICES:
http://www.htmldog.com/guides/htmladvanced/recap/



Separating meaning and presentation
HTML was never meant to be used for presentation, but user-agents incorporated elements that formatted text and developers found ways to manipulate layout.
With the power of CSS it is now no longer necessary to style using HTML and meaning (HTML) can now be completely separated from presentation (CSS).
There are a number of benefits to this - it should greatly decrease file sizes, it has the flexibility of a central style sheet that applies to the entire website rather
than an individual page and it should also produce pages of much greater accessibility.
Following this philosophy basically means you shouldn't style anything within the HTML. Tags such as font or attributes such as bgcolor should not be used.
Even the border attribute inside an img tag is no longer valid in XHTML 1.1. This shouldn't be a problem - there is no styling that can be done in HTML that can't
be done, and done better, with CSS.
It isn't just about taking away the presentation from HTML, the application of meaning means specific HTML tags should be used when appropriate. For example,
h1, h2 etc. should be used for headings - you should not just use CSS to make fonts larger.
A good guide is to see if a visual browser, with its default styling, presents the document well without a style sheet.
Tables should not be used for layout - tables are designed to display tabular data. This is perhaps the most difficult technique for experienced HTMLer's to get
used to as it completely changes the way the HTML has traditionally been structured in the past. This approach greatly reduces the size of the page and, due to
the resulting linear code, it becomes much more accessible.

Tags
In XHTML all tags should be lowercase and must be closed. For those tags that do not have closing tags (such as br and img), they must close themselves with a '/'
at the end (such as <br />). Note that there should be a space before the forward-slash.
The markup must be well formed, with elements properly nested (for example, <strong><em>this</em></strong>, not <strong><em>this</strong></em>).
All documents must have html, head, title and body elements. They must also start with a document type declaration.
The body of the document should start with p, h1, h2, h3, h4, h5, h6, div, pre, address, ins or del.

Attributes
All attributes must also be lowercase and their values in quotation marks.
Minimized attributes are not allowed (such as <input type="checkbox" checked />). Traditionally minimized attributes must be given the value that is
the same as the name of the attribute (such as <input type="checkbox" checked="checked" />).
The name attribute is no longer valid (except in form elements) and should be replaced with id.
The target attribute is not a valid attribute. Praise be. It was daft anyway.
The alt attribute in the img tag is compulsory.

Accessibility
The reasons for making web pages accessible to users with disabilities are quite self-evident. Not only is it moralistic, but it will also benefit our future as
web users grow older and the acuteness of the senses degenerates. Accessibility isn't just about accommodating people with severe disabilities, it is about
making it easier for a great number of people with minor (predominantly visual) impairments.
There are increasing legal implications such as the introduction of 'Section 508' in the US that makes a (half arsed) attempt to enforce certain accessibility
initiatives and in the UK, all government websites must reach a specified degree of accessibility. How long until similar legislation is applied to general commercial
websites, as it is for buildings?
If you follow the above practices, your HTML should already be highly accessible to users with disabilities. There are further initiatives that can make your web pages
even more accessible (for example, see the Accessible Links and Accessible Forms pages) and it really isn't that difficult.
ANOTHER SET OF GREAT ADVICES: how to make links accessible
http://www.htmldog.com/guides/htmladvanced/links/
CSS
How to apply CSS

 In-line (but don't use it)

 <p style="color: red">text</p>
 This will make that specific paragraph red.




 Embedded (but don't use this, too!), or internal styles are used for the whole page. Inside the head tags,
 the style tags surround all of the styles for the page.

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html>
 <head>
 <title>CSS Example</title>
 <style type="text/css">
        p{
             color: red;
        }

       a{
             color: blue;
       }
 </style>
 ...

 This will make all of the paragraphs in the page red and all of the links blue.
How to apply CSS

 External (use this!)

 External styles are used for the whole, multiple-page website. There is a separate CSS file,
 which will simply look something like:

 p{
       color: red;
 }

 a{
       color: blue;
 }

 If this file is saved as "web.css" then it can be linked to in the HTML like this:


 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html>
 <head>
        <title>CSS Example</title>
        <link rel="stylesheet" type="text/css" href="web.css" />
 ...
Selectors

 In CSS you apply style to elements you select from a HTML page

 body{
    background: #000000;
 }
 means that the background of the page should be black


 div.top-block{
      font-size: 12pt;
 }
 means that all the div elements with class=”top-block” will have a font of 12pt


 div#highlight-block{
     color: #FFFF00;
 }
 means that the div element with id=”highlight-block” will have text colored in yellow
Selectors from class and ID (continued)

 GROUPING

 If you have:

 h2 {
        color: red;
 }

 .thisOtherClass {
      color: red;
 }

 .yetAnotherClass {
     color: red;
 }


 You could make it:

 h2, .thisOtherClass, .yetAnotherClass {
      color: red;
 }
Selectors from class and ID (continued)

 NESTING

 you can specify properties to selectors within other selectors.

 #top {
      background-color: #ccc;
      padding: 1em
 }
 #top h1 {
      color: #ff0;
 }
 #top p {
      color: red;
      font-weight: bold;
 }

 Removes the need for classes or ID's if it is applied to HTML that looks something like this:

 <div id="top">
       <h1>Chocolate curry</h1>
       <p>This is my recipe for making curry purely with chocolate</p>
       <p>Mmm mm mmmmm</p>
 </div>

 This is because, by separating selectors with spaces, we are saying

 'h1 inside ID top is colour #ff0' and 'p inside ID top is red and bold'.

 This can get quite complicated (because it can go for more than two levels, such as this
 inside this inside this inside this etc.) and may take a bit of practice.
Selectors from class and ID (continued)

 Pseudo classes

   link is for an unvisited link.
   visited is for a link to a page that has already been visited.
   active is for a link when it is gains focus (for example, when it is clicked on).
   hover is for a link when the cursor is held over it.

 They are used with “ : “ to indicate them

 a.snowman:link {
     color: blue;
 }
 a.snowman:visited {
     color: purple;
 }
 a.snowman:active {
     color: red;
 }
 a.snowman:hover {
     text-decoration: none;
     color: blue;
     background-color: yellow;
 }
Dimensions

 There are many property-specific units for values used in CSS, but there are some
 general units that are used in a number of properties and it is worth familiarising
 yourself with these before continuing.

 em (such as font-size: 2em) is the unit for the calculated size of a font.
 So "2em", for example, is two times the current font size.

 px (such as font-size: 12px) is the unit for pixels.

 pt (such as font-size: 12pt) is the unit for points.

 % (such as font-size: 80%) is the unit for... wait for it... percentages.

 Other units include pc (picas), cm (centimetres), mm (millimetres) and in (inches).

 When a value is zero, you do not need to state a unit.
 For example, if you wanted to specify no border, it would be border: 0.
How to specify colours

 red

 Is the same as

 rgb(255,0,0)

 Which is the same as

 rgb(100%,0%,0%)

 Which is the same as

 #ff0000

 Which is the same as

 #f00

 There are 17 valid predefined colour names.
 They are aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, orange,
 purple, red, silver, teal, white, and yellow.

 transparent is also a valid value.
How to specify colours

 The three values in the rbg value are from 0 to 255, 0 being the lowest level
 (for example no red), 255 being the highest level (for example full red).
 These values can also be a percentage.

 Hexadecimal (previously and more accurately known as 'sexadecimal') is a base-16
 number system. We are generally used to the decimal number system
 (base-10, from 0 to 9), but hexadecimal has 16 digits, from 0 to f.

 The hex number is prefixed with a hash character (#) and can be three or six digits
 in length. Basically, the three-digit version is a compressed version of the
 six-digit (#f00 becomes #ff0000, #c96 becomes #cc9966 etc.).
 The three-digit version is easier to decipher (the first digit, like the first value in
 rgb, is red, the second green and the third blue) but the six-digit version gives you
 more control over the exact colour.
How to specify colours

                 h1 {
                        color: #ffc;
                        background-color: #009;
                 }


                 or

                 h1 {
                        color: blue;
                        background-color: yellow;
                 }



                 or

                 h1 {
                        color: rgb(0,100,200);
                        background-color: transparent;
                 }
TEXT

 font-family
 This is the font itself, such as Times New Roman, Arial, or Verdana.

 The font you specify must be on the user's computer, so there is little point in using
 obscure fonts. There are a select few 'safe' fonts (the most commonly used are arial,
 verdana and times new roman), but you can specify more than one font, separated
 by commas. The purpose of this is that if the user does not have the first font you
 specify, the browser will go through the list until it finds one it does have. This is useful
 because different computers sometimes have different fonts installed.
 So
 font-family: arial, helvetica
 for example, is used so that similar fonts are used on
 PC (which traditionally has arial, but not helvetica) and Apple Mac (which, traditionally,
 does not have arial and so helvetica, which it does normally have, will be used).

 Note: if the name of a font is more than one word, it should be put in quotation marks,
 such as font-family: "Times New Roman".
TEXT

 font-size
 The size of the font.

 Be careful with this - text such as headings should not just be a paragraph in a
 large font; you should still use headings (h1, h2 etc.) even though, in practice,
 you could make the font-size of a paragraph larger than that of a heading
 (not recommended for sensible people).
TEXT

 font-weight
 This states whether the text is bold or not.



 In practice this usually only works as font-weight: bold or font-weight: normal




 In theory it can also be

 bolder, lighter, 100, 200, 300, 400, 500, 600, 700, 800 or 900


 but seeing as many browsers shake their heads and say "I don't think so",
 it's safer to stick with bold and normal.
TEXT

 font-style
 This states whether the text is italic or not.

 It can be font-style: italic or font-style: normal




 text-decoration
 This states whether the text is underlined or not. This can be:

   text-decoration: overline, which places a line above the text.
   text-decoration: line-through, strike-through, which puts a line through the text.
   text-decoration: underline should only be used for links because users generally
                               expect underlined text to be links.

 This property is usually used to decorate links, such as specifying no underline
 with text-decoration: none
TEXT

 text-transform
   text-transform: capitalize turns the first letter of every word into uppercase.
   text-transform: uppercase turns everything into uppercase.
   text-transform: lowercase turns everything into lowercase.
   text-transform: none does not apply any transform.


 TEXT SPACING
 The letter-spacing and word-spacing properties are for spacing between letters
 or words. The value can be a length or normal.

 The line-height property sets the height of the lines in an element, such as a
 paragraph, without adjusting the size of the font. It can be a number (which specifies
 a multiple of the font size, so '2' will be two times the font size, for example), a length,
 a percentage or normal.

 The text-align property will align the text inside an element to left, right, center or justify.

 The text-indent property will indent the first line of a paragraph, for example,
 to a given length or percentage.
MARGIN and PADDING

 margin and padding are the two most commonly used properties for spacing-
 out elements.

 A margin is the space outside of the element, whereas
 padding is the space inside the element.

 h2 {
        font-size: 1.5em;
        background-color: #ccc;
        margin: 1em;
        padding: 3em;
 }


 You will see that this leaves one-character width space around the secondary
 header and the header itself is fat from the three-character width padding.

 The four sides of an element can also be set individually with these CSS properties

 margin-top, margin-right, margin-bottom, margin-left,
 padding-top, padding-right, padding-bottom and padding-left
BORDER

 To make a border around an element, all you need is border-style.
 The values can be solid, dotted, dashed, double, groove, ridge, inset and outset.

 border-width sets the width of the border, which is usually in pixels.

 There are also properties for
 border-top-width, border-right-width, border-bottom-width and border-left-width

 border-color sets the colour.


 h2 {
        border-style: dashed;
        border-width: 3px;
        border-left-width: 10px;
        border-right-width: 10px;
        border-color: red;
 }

 This will make a red dashed border around all HTML secondary headers
 (the h2 element) that is 3 pixels wide on the top and bottom and 10 pixels wide
 on the left and right (these having over-ridden the 3 pixel wide width of
 the entire border).
Background images

 body {
 background: white url(http://www.htmldog.com/images/bg.gif) no-repeat top right;
 }

 This amalgamates these properties:

   background-color, is the color of the background where there is no image.
   background-image, is the internet address of the image.
   background-repeat,       is how the image repeats itself.
     This can be
     repeat (equivalent to a 'tile' effect across the whole background),
     repeat-y (repeating on the 'y-axis', above and below),
     repeat-x (repeating on the 'x-axis', side-by-side) or
     no-repeat (which shows just one instance of the image).

   background-position, which can be top, center, bottom, left, right
                        or any sensible combination, such as above.

 Background-images can be used in most HTML elements - not just for the whole
 page (body) and can be used for simple but effective results, such as shaped corners.
Display property



inline elements are displayed inline to follow the flow of a line.

block puts a line break before and after the element.

none doesn't display the element




div.blocks-to-be-hidden{
     display: none;
}

(all these blocks will be hidden)
Position



The position property is used to define whether an element is
absolute, relative, static or fixed.

The value static is the default value for elements and renders the position in
the normal order of things, as they appear in the HTML.

relative is much like static, but the element can be offset from its original position
with the properties top, right, bottom and left.

absolute pulls an element out of the normal flow of the HTML and delivers it to
a world all of its own.
In this crazy little world, the absolute element can be placed anywhere on
the page using top, right, bottom and left.

fixed behaves like absolute, but it will absolutely position an element in reference
to the browser window as opposed to the web page, so, theoretically, fixed
elements should stay exactly where they are on the screen even when
the page is scrolled.
Why theoretically?
Why else - this works great in browsers such as Mozilla and Opera, but
in IE it doesn't work at all.
Floating



Floating an element will shift it to the right or left of a line, with surrounding
content flowing around it.

Floating is normally used to position smaller elements within a page,
but it can also be used with bigger chunks, such as navigation columns.

Taking the HTML example below, you could apply the following CSS:


#navigation {
   float: left;
   width: 10em;
}
#navigation2 {
   float: right;
   width: 10em;
}
Media Types
The media at-rule will apply its contents to a specified media, such as print. For example:


@media print {
  body {
       font-size: 10pt;
       font-family: times new roman, times, serif;
  }

      #navigation {
          display: none;
      }
}

The media-type can be:

    all - for every media under, over, around and in the sun.
    aural - for speech synthesizers.
    handheld - for handheld devices.
    print - for printers.
    projection - for projectors.
    screen - for computer screens.

You can also use braille, embossed, tty or tv
SOME LINKS
http://www.w3.org/
The World Wide Web Consortium (standards, reference, guides)

http://www.projectseven.com/tutorials/index.htm
Tutorials

http://www.bluerobot.com/web/layouts/
Simple layouts using CSS

http://www.glish.com/css/
CSS techniques

http://realworldstyle.com/
CSS tricks

http://www.csszengarden.com/
Learn how CSS can radically change a website
TO DO
TAKE THIS SIMPLE WEBPAGE AND MAKE IT BEAUTIFUL USING CSS
(note: you have to add the link to the CSS file as shown in the first slides)




<html>
    <head>
        <title>This website is beautiful</title>
    </head>
    <body>
        <div id="container">
              <div id="first-block">
                   <div class="testo">THIS</div>
              </div>
              <div id="second-block">
                   <div class="testo">WEBSITE</div>
              </div>
              <div id="third-block">
                   <div class="testo">IS BEAUTIFUL</div>
              </div>
        </div>
    </body>
</html>

Contenu connexe

Tendances

Rapid HTML Prototyping with Bootstrap 4
Rapid HTML Prototyping with Bootstrap 4Rapid HTML Prototyping with Bootstrap 4
Rapid HTML Prototyping with Bootstrap 4UXPA International
 
CSS: a rapidly changing world
CSS: a rapidly changing worldCSS: a rapidly changing world
CSS: a rapidly changing worldRuss Weakley
 
Usability and accessibility on the web
Usability and accessibility on the webUsability and accessibility on the web
Usability and accessibility on the webVlad Posea
 
IPW 3rd Course - CSS
IPW 3rd Course - CSSIPW 3rd Course - CSS
IPW 3rd Course - CSSVlad Posea
 
3 Langkah Mudah Membuat Website Dakwah (User Friendly - SEO Friendly - Mobile...
3 Langkah Mudah Membuat Website Dakwah (User Friendly - SEO Friendly - Mobile...3 Langkah Mudah Membuat Website Dakwah (User Friendly - SEO Friendly - Mobile...
3 Langkah Mudah Membuat Website Dakwah (User Friendly - SEO Friendly - Mobile...Wahyu Putra
 
Create Responsive Website Design with Bootstrap 3
Create Responsive Website Design with Bootstrap 3Create Responsive Website Design with Bootstrap 3
Create Responsive Website Design with Bootstrap 3Wahyu Putra
 
Html css java script basics All about you need
Html css java script basics All about you needHtml css java script basics All about you need
Html css java script basics All about you needDipen Parmar
 
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog TemplateBP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog TemplateSean Burgess
 
HTML und CSS für Designer / HTML & CSS for designers (PUBKON 2014)
HTML und CSS für Designer / HTML & CSS for designers (PUBKON 2014)HTML und CSS für Designer / HTML & CSS for designers (PUBKON 2014)
HTML und CSS für Designer / HTML & CSS for designers (PUBKON 2014)Michaela Lehr
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTMLAjay Khatri
 
UVA MDST 3073 CSS 2012-09-20
UVA MDST 3073 CSS 2012-09-20UVA MDST 3073 CSS 2012-09-20
UVA MDST 3073 CSS 2012-09-20Rafael Alvarado
 
3 Layers of the Web - Part 1
3 Layers of the Web - Part 13 Layers of the Web - Part 1
3 Layers of the Web - Part 1Jeremy White
 
Training HTML5 CSS3 Ilkom IPB
Training HTML5 CSS3 Ilkom IPBTraining HTML5 CSS3 Ilkom IPB
Training HTML5 CSS3 Ilkom IPBWahyu Putra
 
HTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts BasicsHTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts BasicsSun Technlogies
 

Tendances (20)

Rapid HTML Prototyping with Bootstrap 4
Rapid HTML Prototyping with Bootstrap 4Rapid HTML Prototyping with Bootstrap 4
Rapid HTML Prototyping with Bootstrap 4
 
CSS: a rapidly changing world
CSS: a rapidly changing worldCSS: a rapidly changing world
CSS: a rapidly changing world
 
Usability and accessibility on the web
Usability and accessibility on the webUsability and accessibility on the web
Usability and accessibility on the web
 
IPW 3rd Course - CSS
IPW 3rd Course - CSSIPW 3rd Course - CSS
IPW 3rd Course - CSS
 
3 Langkah Mudah Membuat Website Dakwah (User Friendly - SEO Friendly - Mobile...
3 Langkah Mudah Membuat Website Dakwah (User Friendly - SEO Friendly - Mobile...3 Langkah Mudah Membuat Website Dakwah (User Friendly - SEO Friendly - Mobile...
3 Langkah Mudah Membuat Website Dakwah (User Friendly - SEO Friendly - Mobile...
 
Create Responsive Website Design with Bootstrap 3
Create Responsive Website Design with Bootstrap 3Create Responsive Website Design with Bootstrap 3
Create Responsive Website Design with Bootstrap 3
 
Html css java script basics All about you need
Html css java script basics All about you needHtml css java script basics All about you need
Html css java script basics All about you need
 
Html
HtmlHtml
Html
 
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog TemplateBP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
 
HTML und CSS für Designer / HTML & CSS for designers (PUBKON 2014)
HTML und CSS für Designer / HTML & CSS for designers (PUBKON 2014)HTML und CSS für Designer / HTML & CSS for designers (PUBKON 2014)
HTML und CSS für Designer / HTML & CSS for designers (PUBKON 2014)
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
Basic css
Basic cssBasic css
Basic css
 
UVA MDST 3073 CSS 2012-09-20
UVA MDST 3073 CSS 2012-09-20UVA MDST 3073 CSS 2012-09-20
UVA MDST 3073 CSS 2012-09-20
 
Css notes
Css notesCss notes
Css notes
 
Css ppt
Css pptCss ppt
Css ppt
 
Html4
Html4Html4
Html4
 
Css
CssCss
Css
 
3 Layers of the Web - Part 1
3 Layers of the Web - Part 13 Layers of the Web - Part 1
3 Layers of the Web - Part 1
 
Training HTML5 CSS3 Ilkom IPB
Training HTML5 CSS3 Ilkom IPBTraining HTML5 CSS3 Ilkom IPB
Training HTML5 CSS3 Ilkom IPB
 
HTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts BasicsHTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts Basics
 

En vedette

Mm assi no 6 positioning and pricing
Mm assi no 6 positioning and pricingMm assi no 6 positioning and pricing
Mm assi no 6 positioning and pricingNajeebhemat Malikzia
 
Siem reap phnom penh adventure tour, Siem Reap adventure tours, trekking to...
Siem reap   phnom penh adventure tour, Siem Reap adventure tours, trekking to...Siem reap   phnom penh adventure tour, Siem Reap adventure tours, trekking to...
Siem reap phnom penh adventure tour, Siem Reap adventure tours, trekking to...Trang Viet
 
Master Exhibit & Public Design, La Sapienza, Lezione 1
Master Exhibit & Public Design, La Sapienza, Lezione 1Master Exhibit & Public Design, La Sapienza, Lezione 1
Master Exhibit & Public Design, La Sapienza, Lezione 1Salvatore Iaconesi
 
FakePress presents: Cities tell their stories and "a Fake Project"
FakePress presents: Cities tell their stories and "a Fake Project"FakePress presents: Cities tell their stories and "a Fake Project"
FakePress presents: Cities tell their stories and "a Fake Project"Salvatore Iaconesi
 
Fake Press, Ubiquitous Anthropology
Fake Press, Ubiquitous AnthropologyFake Press, Ubiquitous Anthropology
Fake Press, Ubiquitous AnthropologySalvatore Iaconesi
 
Emergent Communities and Open Source Cure
Emergent Communities and Open Source CureEmergent Communities and Open Source Cure
Emergent Communities and Open Source CureSalvatore Iaconesi
 
Sensible Data, a presentation for Visualizing Europe
Sensible Data, a presentation for Visualizing EuropeSensible Data, a presentation for Visualizing Europe
Sensible Data, a presentation for Visualizing EuropeSalvatore Iaconesi
 
Sperimentazioni di Tecnologie e Comunicazioni Multimediali: Lezione 5
Sperimentazioni di Tecnologie e Comunicazioni Multimediali: Lezione 5Sperimentazioni di Tecnologie e Comunicazioni Multimediali: Lezione 5
Sperimentazioni di Tecnologie e Comunicazioni Multimediali: Lezione 5Salvatore Iaconesi
 
Human Ecosystems - the relational ecosystems of cities for a new definition o...
Human Ecosystems - the relational ecosystems of cities for a new definition o...Human Ecosystems - the relational ecosystems of cities for a new definition o...
Human Ecosystems - the relational ecosystems of cities for a new definition o...Salvatore Iaconesi
 
REFF Workshops and Tutorials: slides, informations and software downloads
REFF Workshops and Tutorials: slides, informations and software downloadsREFF Workshops and Tutorials: slides, informations and software downloads
REFF Workshops and Tutorials: slides, informations and software downloadsSalvatore Iaconesi
 
Reff 04 macme-installation-tutorial
Reff 04 macme-installation-tutorialReff 04 macme-installation-tutorial
Reff 04 macme-installation-tutorialSalvatore Iaconesi
 
Sperimentazioni lezione6 from_designtoapplication copy
Sperimentazioni lezione6 from_designtoapplication copySperimentazioni lezione6 from_designtoapplication copy
Sperimentazioni lezione6 from_designtoapplication copySalvatore Iaconesi
 
Wearing Emotions by FakePress, presented at the IV10 conference in London, Ju...
Wearing Emotions by FakePress, presented at the IV10 conference in London, Ju...Wearing Emotions by FakePress, presented at the IV10 conference in London, Ju...
Wearing Emotions by FakePress, presented at the IV10 conference in London, Ju...Salvatore Iaconesi
 
VersuS: loveVSturin and romeVSriots, the presentation held at Piemonte Share ...
VersuS: loveVSturin and romeVSriots, the presentation held at Piemonte Share ...VersuS: loveVSturin and romeVSriots, the presentation held at Piemonte Share ...
VersuS: loveVSturin and romeVSriots, the presentation held at Piemonte Share ...Salvatore Iaconesi
 

En vedette (20)

Thunderbird cheat-sheet
Thunderbird cheat-sheetThunderbird cheat-sheet
Thunderbird cheat-sheet
 
Business Development in Kazakhstan (Linkage & Mind Law Firm Example)
Business Development in Kazakhstan (Linkage & Mind Law Firm Example)Business Development in Kazakhstan (Linkage & Mind Law Firm Example)
Business Development in Kazakhstan (Linkage & Mind Law Firm Example)
 
Miss la sen chibi
Miss  la sen chibiMiss  la sen chibi
Miss la sen chibi
 
Mm assi no 6 positioning and pricing
Mm assi no 6 positioning and pricingMm assi no 6 positioning and pricing
Mm assi no 6 positioning and pricing
 
Siem reap phnom penh adventure tour, Siem Reap adventure tours, trekking to...
Siem reap   phnom penh adventure tour, Siem Reap adventure tours, trekking to...Siem reap   phnom penh adventure tour, Siem Reap adventure tours, trekking to...
Siem reap phnom penh adventure tour, Siem Reap adventure tours, trekking to...
 
1º Informe Mensual CECC
1º Informe Mensual CECC1º Informe Mensual CECC
1º Informe Mensual CECC
 
Master Exhibit & Public Design, La Sapienza, Lezione 1
Master Exhibit & Public Design, La Sapienza, Lezione 1Master Exhibit & Public Design, La Sapienza, Lezione 1
Master Exhibit & Public Design, La Sapienza, Lezione 1
 
FakePress presents: Cities tell their stories and "a Fake Project"
FakePress presents: Cities tell their stories and "a Fake Project"FakePress presents: Cities tell their stories and "a Fake Project"
FakePress presents: Cities tell their stories and "a Fake Project"
 
Fake Press, Ubiquitous Anthropology
Fake Press, Ubiquitous AnthropologyFake Press, Ubiquitous Anthropology
Fake Press, Ubiquitous Anthropology
 
Emergent Communities and Open Source Cure
Emergent Communities and Open Source CureEmergent Communities and Open Source Cure
Emergent Communities and Open Source Cure
 
Sensible Data, a presentation for Visualizing Europe
Sensible Data, a presentation for Visualizing EuropeSensible Data, a presentation for Visualizing Europe
Sensible Data, a presentation for Visualizing Europe
 
Sperimentazioni di Tecnologie e Comunicazioni Multimediali: Lezione 5
Sperimentazioni di Tecnologie e Comunicazioni Multimediali: Lezione 5Sperimentazioni di Tecnologie e Comunicazioni Multimediali: Lezione 5
Sperimentazioni di Tecnologie e Comunicazioni Multimediali: Lezione 5
 
L’inquietudine di manzoni
L’inquietudine di manzoniL’inquietudine di manzoni
L’inquietudine di manzoni
 
Human Ecosystems - the relational ecosystems of cities for a new definition o...
Human Ecosystems - the relational ecosystems of cities for a new definition o...Human Ecosystems - the relational ecosystems of cities for a new definition o...
Human Ecosystems - the relational ecosystems of cities for a new definition o...
 
REFF Workshops and Tutorials: slides, informations and software downloads
REFF Workshops and Tutorials: slides, informations and software downloadsREFF Workshops and Tutorials: slides, informations and software downloads
REFF Workshops and Tutorials: slides, informations and software downloads
 
Aivot 1: a concept Library
Aivot 1: a concept LibraryAivot 1: a concept Library
Aivot 1: a concept Library
 
Reff 04 macme-installation-tutorial
Reff 04 macme-installation-tutorialReff 04 macme-installation-tutorial
Reff 04 macme-installation-tutorial
 
Sperimentazioni lezione6 from_designtoapplication copy
Sperimentazioni lezione6 from_designtoapplication copySperimentazioni lezione6 from_designtoapplication copy
Sperimentazioni lezione6 from_designtoapplication copy
 
Wearing Emotions by FakePress, presented at the IV10 conference in London, Ju...
Wearing Emotions by FakePress, presented at the IV10 conference in London, Ju...Wearing Emotions by FakePress, presented at the IV10 conference in London, Ju...
Wearing Emotions by FakePress, presented at the IV10 conference in London, Ju...
 
VersuS: loveVSturin and romeVSriots, the presentation held at Piemonte Share ...
VersuS: loveVSturin and romeVSriots, the presentation held at Piemonte Share ...VersuS: loveVSturin and romeVSriots, the presentation held at Piemonte Share ...
VersuS: loveVSturin and romeVSriots, the presentation held at Piemonte Share ...
 

Similaire à Sperimentazioni di Tecnologie e Comunicazioni Multimediali: Lezione 3

Introduction to whats new in css3
Introduction to whats new in css3Introduction to whats new in css3
Introduction to whats new in css3Usman Mehmood
 
Lab#1 - Front End Development
Lab#1 - Front End DevelopmentLab#1 - Front End Development
Lab#1 - Front End DevelopmentWalid Ashraf
 
GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1Heather Rock
 
Class Intro / HTML Basics
Class Intro / HTML BasicsClass Intro / HTML Basics
Class Intro / HTML BasicsShawn Calvert
 
Intermediate Web Design.doc
Intermediate Web Design.docIntermediate Web Design.doc
Intermediate Web Design.docbutest
 
Intermediate Web Design.doc
Intermediate Web Design.docIntermediate Web Design.doc
Intermediate Web Design.docbutest
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS PresentationShawn Calvert
 
WELCOME-FOLKS--CSS.-AND-HTMLS.pptx
WELCOME-FOLKS--CSS.-AND-HTMLS.pptxWELCOME-FOLKS--CSS.-AND-HTMLS.pptx
WELCOME-FOLKS--CSS.-AND-HTMLS.pptxHeroVins
 
HTML Foundations, part 1
HTML Foundations, part 1HTML Foundations, part 1
HTML Foundations, part 1Shawn Calvert
 
Document object model
Document object modelDocument object model
Document object modelAmit kumar
 
Class 1: Introductions
Class 1: IntroductionsClass 1: Introductions
Class 1: IntroductionsErika Tarte
 

Similaire à Sperimentazioni di Tecnologie e Comunicazioni Multimediali: Lezione 3 (20)

Introduction to whats new in css3
Introduction to whats new in css3Introduction to whats new in css3
Introduction to whats new in css3
 
Week 2-intro-html
Week 2-intro-htmlWeek 2-intro-html
Week 2-intro-html
 
Lab#1 - Front End Development
Lab#1 - Front End DevelopmentLab#1 - Front End Development
Lab#1 - Front End Development
 
GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1
 
Session ii(html)
Session ii(html)Session ii(html)
Session ii(html)
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
Class Intro / HTML Basics
Class Intro / HTML BasicsClass Intro / HTML Basics
Class Intro / HTML Basics
 
Web technologies part-2
Web technologies part-2Web technologies part-2
Web technologies part-2
 
Intermediate Web Design.doc
Intermediate Web Design.docIntermediate Web Design.doc
Intermediate Web Design.doc
 
Intermediate Web Design.doc
Intermediate Web Design.docIntermediate Web Design.doc
Intermediate Web Design.doc
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
 
WELCOME-FOLKS--CSS.-AND-HTMLS.pptx
WELCOME-FOLKS--CSS.-AND-HTMLS.pptxWELCOME-FOLKS--CSS.-AND-HTMLS.pptx
WELCOME-FOLKS--CSS.-AND-HTMLS.pptx
 
HTML_CSS_JS Workshop
HTML_CSS_JS WorkshopHTML_CSS_JS Workshop
HTML_CSS_JS Workshop
 
Html
HtmlHtml
Html
 
Presentation 1 [autosaved]
Presentation 1 [autosaved]Presentation 1 [autosaved]
Presentation 1 [autosaved]
 
Introduction css
Introduction cssIntroduction css
Introduction css
 
Introduction css
Introduction cssIntroduction css
Introduction css
 
HTML Foundations, part 1
HTML Foundations, part 1HTML Foundations, part 1
HTML Foundations, part 1
 
Document object model
Document object modelDocument object model
Document object model
 
Class 1: Introductions
Class 1: IntroductionsClass 1: Introductions
Class 1: Introductions
 

Plus de Salvatore Iaconesi

Innovation and Trangression: exploring Third Spaces and Excess Spaces
Innovation and Trangression: exploring Third Spaces and Excess SpacesInnovation and Trangression: exploring Third Spaces and Excess Spaces
Innovation and Trangression: exploring Third Spaces and Excess SpacesSalvatore Iaconesi
 
Third Infoscape, presented at DIS2017 in Edinburgh
Third Infoscape, presented at DIS2017 in EdinburghThird Infoscape, presented at DIS2017 in Edinburgh
Third Infoscape, presented at DIS2017 in EdinburghSalvatore Iaconesi
 
La Cura: Erbe Indisciplinate, ricapitolazione
La Cura: Erbe Indisciplinate, ricapitolazioneLa Cura: Erbe Indisciplinate, ricapitolazione
La Cura: Erbe Indisciplinate, ricapitolazioneSalvatore Iaconesi
 
La Cura, Erbe Indisciplinate, presentazione di benvenuto, frame
La Cura, Erbe Indisciplinate, presentazione di benvenuto, frameLa Cura, Erbe Indisciplinate, presentazione di benvenuto, frame
La Cura, Erbe Indisciplinate, presentazione di benvenuto, frameSalvatore Iaconesi
 
Human Ecosystems and the Ubiquitous Commons at the STARTS program meeting
Human Ecosystems and the Ubiquitous Commons at the STARTS program meetingHuman Ecosystems and the Ubiquitous Commons at the STARTS program meeting
Human Ecosystems and the Ubiquitous Commons at the STARTS program meetingSalvatore Iaconesi
 
Ubiquitous Commons at NetFutures 2015
Ubiquitous Commons at NetFutures 2015Ubiquitous Commons at NetFutures 2015
Ubiquitous Commons at NetFutures 2015Salvatore Iaconesi
 
Near Future Design class at Isia Design: Transmedia narratives
Near Future Design class at Isia Design: Transmedia narratives Near Future Design class at Isia Design: Transmedia narratives
Near Future Design class at Isia Design: Transmedia narratives Salvatore Iaconesi
 
Ubiquitous Commons workshop at transmediale 2015, Capture All
Ubiquitous Commons workshop at transmediale 2015, Capture AllUbiquitous Commons workshop at transmediale 2015, Capture All
Ubiquitous Commons workshop at transmediale 2015, Capture AllSalvatore Iaconesi
 
Informazione Ubiqua: come è fatto un museo ubiquo?
Informazione Ubiqua: come è fatto un museo ubiquo?Informazione Ubiqua: come è fatto un museo ubiquo?
Informazione Ubiqua: come è fatto un museo ubiquo?Salvatore Iaconesi
 
Art is Open Source at Visualize: materials and links
Art is Open Source at Visualize: materials and linksArt is Open Source at Visualize: materials and links
Art is Open Source at Visualize: materials and linksSalvatore Iaconesi
 
Near Future Design: the performance of infinite futures
Near Future Design: the performance of infinite futuresNear Future Design: the performance of infinite futures
Near Future Design: the performance of infinite futuresSalvatore Iaconesi
 
Incautious Porn, SSN2014 Presentation in Barcelona
Incautious Porn, SSN2014 Presentation in BarcelonaIncautious Porn, SSN2014 Presentation in Barcelona
Incautious Porn, SSN2014 Presentation in BarcelonaSalvatore Iaconesi
 
Near Future Design - ISIA 6 Marzo 2014
Near Future Design - ISIA 6 Marzo 2014Near Future Design - ISIA 6 Marzo 2014
Near Future Design - ISIA 6 Marzo 2014Salvatore Iaconesi
 
La Cura: an Open Source Cure for Cancer, at Transmediale 2014: Afterglow. In ...
La Cura: an Open Source Cure for Cancer, at Transmediale 2014: Afterglow. In ...La Cura: an Open Source Cure for Cancer, at Transmediale 2014: Afterglow. In ...
La Cura: an Open Source Cure for Cancer, at Transmediale 2014: Afterglow. In ...Salvatore Iaconesi
 
Openness Workshop at Luiss i-Lab
Openness Workshop at Luiss i-Lab Openness Workshop at Luiss i-Lab
Openness Workshop at Luiss i-Lab Salvatore Iaconesi
 
EC(m1) the Cultural Ecosystem of Rome, at Cultur+
EC(m1) the Cultural Ecosystem of Rome, at Cultur+EC(m1) the Cultural Ecosystem of Rome, at Cultur+
EC(m1) the Cultural Ecosystem of Rome, at Cultur+Salvatore Iaconesi
 
Innovation Ecosystems at Internet Festival 2013
Innovation Ecosystems at Internet Festival 2013Innovation Ecosystems at Internet Festival 2013
Innovation Ecosystems at Internet Festival 2013Salvatore Iaconesi
 
Master UX from design to prototype
Master UX from design to prototypeMaster UX from design to prototype
Master UX from design to prototypeSalvatore Iaconesi
 
Using real-time social networks to produce usable knowledge
Using real-time social networks to produce usable knowledgeUsing real-time social networks to produce usable knowledge
Using real-time social networks to produce usable knowledgeSalvatore Iaconesi
 

Plus de Salvatore Iaconesi (20)

Innovation and Trangression: exploring Third Spaces and Excess Spaces
Innovation and Trangression: exploring Third Spaces and Excess SpacesInnovation and Trangression: exploring Third Spaces and Excess Spaces
Innovation and Trangression: exploring Third Spaces and Excess Spaces
 
Third Infoscape, presented at DIS2017 in Edinburgh
Third Infoscape, presented at DIS2017 in EdinburghThird Infoscape, presented at DIS2017 in Edinburgh
Third Infoscape, presented at DIS2017 in Edinburgh
 
La Cura: Erbe Indisciplinate, ricapitolazione
La Cura: Erbe Indisciplinate, ricapitolazioneLa Cura: Erbe Indisciplinate, ricapitolazione
La Cura: Erbe Indisciplinate, ricapitolazione
 
La Cura, Erbe Indisciplinate, presentazione di benvenuto, frame
La Cura, Erbe Indisciplinate, presentazione di benvenuto, frameLa Cura, Erbe Indisciplinate, presentazione di benvenuto, frame
La Cura, Erbe Indisciplinate, presentazione di benvenuto, frame
 
Human Ecosystems and the Ubiquitous Commons at the STARTS program meeting
Human Ecosystems and the Ubiquitous Commons at the STARTS program meetingHuman Ecosystems and the Ubiquitous Commons at the STARTS program meeting
Human Ecosystems and the Ubiquitous Commons at the STARTS program meeting
 
Ubiquitous Commons at NetFutures 2015
Ubiquitous Commons at NetFutures 2015Ubiquitous Commons at NetFutures 2015
Ubiquitous Commons at NetFutures 2015
 
Near Future Design class at Isia Design: Transmedia narratives
Near Future Design class at Isia Design: Transmedia narratives Near Future Design class at Isia Design: Transmedia narratives
Near Future Design class at Isia Design: Transmedia narratives
 
Imaginary Brands
Imaginary BrandsImaginary Brands
Imaginary Brands
 
Ubiquitous Commons workshop at transmediale 2015, Capture All
Ubiquitous Commons workshop at transmediale 2015, Capture AllUbiquitous Commons workshop at transmediale 2015, Capture All
Ubiquitous Commons workshop at transmediale 2015, Capture All
 
Informazione Ubiqua: come è fatto un museo ubiquo?
Informazione Ubiqua: come è fatto un museo ubiquo?Informazione Ubiqua: come è fatto un museo ubiquo?
Informazione Ubiqua: come è fatto un museo ubiquo?
 
Art is Open Source at Visualize: materials and links
Art is Open Source at Visualize: materials and linksArt is Open Source at Visualize: materials and links
Art is Open Source at Visualize: materials and links
 
Near Future Design: the performance of infinite futures
Near Future Design: the performance of infinite futuresNear Future Design: the performance of infinite futures
Near Future Design: the performance of infinite futures
 
Incautious Porn, SSN2014 Presentation in Barcelona
Incautious Porn, SSN2014 Presentation in BarcelonaIncautious Porn, SSN2014 Presentation in Barcelona
Incautious Porn, SSN2014 Presentation in Barcelona
 
Near Future Design - ISIA 6 Marzo 2014
Near Future Design - ISIA 6 Marzo 2014Near Future Design - ISIA 6 Marzo 2014
Near Future Design - ISIA 6 Marzo 2014
 
La Cura: an Open Source Cure for Cancer, at Transmediale 2014: Afterglow. In ...
La Cura: an Open Source Cure for Cancer, at Transmediale 2014: Afterglow. In ...La Cura: an Open Source Cure for Cancer, at Transmediale 2014: Afterglow. In ...
La Cura: an Open Source Cure for Cancer, at Transmediale 2014: Afterglow. In ...
 
Openness Workshop at Luiss i-Lab
Openness Workshop at Luiss i-Lab Openness Workshop at Luiss i-Lab
Openness Workshop at Luiss i-Lab
 
EC(m1) the Cultural Ecosystem of Rome, at Cultur+
EC(m1) the Cultural Ecosystem of Rome, at Cultur+EC(m1) the Cultural Ecosystem of Rome, at Cultur+
EC(m1) the Cultural Ecosystem of Rome, at Cultur+
 
Innovation Ecosystems at Internet Festival 2013
Innovation Ecosystems at Internet Festival 2013Innovation Ecosystems at Internet Festival 2013
Innovation Ecosystems at Internet Festival 2013
 
Master UX from design to prototype
Master UX from design to prototypeMaster UX from design to prototype
Master UX from design to prototype
 
Using real-time social networks to produce usable knowledge
Using real-time social networks to produce usable knowledgeUsing real-time social networks to produce usable knowledge
Using real-time social networks to produce usable knowledge
 

Dernier

Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
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
 
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
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 

Dernier (20)

YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
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
 
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
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 

Sperimentazioni di Tecnologie e Comunicazioni Multimediali: Lezione 3

  • 1. SPERIMENTAZIONI DI TECNOLOGIE E COMUNICAZIONI MULTIMEDIALI Lesson 3: BASE HTML & CSS Salvatore Iaconesi salvatore.iaconesi@artisopensource.net
  • 2. This lesson is about HTML & CSS
  • 3. The course is not about HTML & CSS But we need them to build our web and mobile experiences
  • 4. ... so here is a large tutorial so that we know a little more about HTML & CSS We will use these things in class multiple times! Please study this tutorial well, so that you'll be able to use your time better in class! (and don't be afraid about mistakes... things will turn out to be really easy the third/fourth/fifth time you do them)
  • 5. HTML = structure of a page CSS = aesthetics of a page
  • 7. In HTML you define structure! Is this a title? Is this a paragraph of text? Is this box a user profile? Etcetera... In HTML you don't care if it's green or blue, you care about what each object MEANS and about what is the STRUCTURE and ROLE of an object of a page
  • 8. HTML is a DOCUMENT! HTML is what is called a MARKUP LANGUAGE MARKUP languages describe documents in terms of their - structures - links - relations - roles HTML describes the STRUCTURE of a web page (and, since a little while, of a mobile web page, too) http://en.wikipedia.org/wiki/Markup_language http://en.wikipedia.org/wiki/Html
  • 9. Each document (and, thus, HTML documents) have: META DATA & DATA META DATA: describes what is in the document (ex.: title, author, date, keywords) DATA: is the content of the document (ex.: text, images, videos, links)
  • 10. META DATA is disseminated all over your HTML documents It is used for various purposes SEO (Search Engine Optimization) Internationalization Access for users with disabilities Semantic web And loads more....
  • 11. SEO (Search Engine Optimization) It is not acceptable any more to have a website that is not optimized for search engines. If your site is not reachable on search engines it does not exist. Even more: SEO now reaches into Social Networks (Facebook, Twitter...) The trend is: “Classical websites (however beautiful and interactive) are progressively less useful (tending to zero). Websites today MUST: connect to social networks, establish dialogues, must be readable or easily translatable by people across languages and cultures, must be searchable, taggable, aggregatable, indexable.”
  • 12. Internationalization You don't need to translate everything, but you NEED to make everything easily Translatable to your users (for example by using Google Translate services). In your meta data: - you need to define the main language of the page - you need to define the correct character set of the page (UTF-8 if you're not sure) - you need to use plain, readable text wherever you can - you need to include meta data even in tags wherever you can Try avoiding Flash whenever you can (HTML5 and CSS3 do wonders! Use these if you can)
  • 13. Access for disabilities This is how a blind person sees your webpage
  • 14. Access for disabilities or education issues Lots of tools exist nowadays to make the world an enormously better place for People who can't see, hear, or for people who may be a bit more unlucky than You are, and maybe they don't know how to read because they didn't have a chance To go to school for some reason. You can let all of them experience the beautiful things you do, or the beautiful websites You will create for your clients. If you just use the right metadata at the right spot. for example giving nice titles to images, or adding descriptions to the elements of Your page, or by describing if an element on page is a title or a subtitle, etc. They will experience a wonderful thing and the world will be much nicer (and you will also be the first on Google search if you use all this metadata) USE YOUR META DATA!
  • 15. Semantic web Use meta data to define the roles of the elements on your page. Automatic systems will be able to read your page and store it correctly into databases that hold the description of the knowledge on the web This is the future of how we will access information on the web: - web content will be indexed semantically - we will search not for words, but for meanings - we will find what we want (if the owner of the website remembered to use meta data) http://en.wikipedia.org/wiki/Semantic_Web
  • 16. THIS IS THE MOST IMPORTANT THING ABOUT WEB PAGES! :) IF YOU UNDERSTAND THIS YOUR LIFE WILL BE EASIER
  • 17. HOW TO ASSIGN ROLES AND SEMANTIC TYPES TO THE ELEMENTS ON YOUR INTERFACES It is useful to assign CLASS and/or ID to the elements of your page CLASS and ID describe the role of an element in your page Role ex. of roles: title, first paragraph, image caption, citation, box heading.... Role represents what the element represents in the structure of the page, what is its meaning, its function We can use the definition of the role of an element in HTML to describe its function in the structure of the page, and then we will use it as a reference in CSS to assign its representation (ex.: we will be able to say things like “each title has a yellow background”)
  • 18. CLASS ID It is a TYPE (a title, a paragraph...) It is an identity (the THIRD title) There can be more than one on each page There can be one of each in a page (ex.: all the titles shown in the page) (ex.: there will be only 1 “THIRD title” on a page) <div class=”title”>...</div> <div id=”title-3”>...</div> You can use same class on multiple You can use an ID in only one element Elements Each element can be of more than Each element can have only 1 ID one class <div class=”title news-section”>...</div> An element can have both ID and class <div id=”title-3” class=”title”>...</div> (this would probably mean that this div Is a title and that it is exactly the third-title)
  • 19. WHY DO WE NEED CLASS AND ID? To define the semantic (meaning) of our pages (so that, for example, Google can read them and index them properly) To define style with CSS (through CSS we could say that all titles on our pages are yellow, but the first one will be also with a red background --> we need CLASS and ID to do that) To make our page more active with javascript (for example we could like to have an animation on all our titles when we enter a page --> we will use CLASS from Javascript to create the animation; we could want a different one on the first title alone --> we will use ID in this case)
  • 20. WHAT IS INSIDE A WEB PAGE?
  • 21. .... document setup .... <html> <head> ... the parts of the heading... </head> <body> .... your content ... </body> </html>
  • 22. DOCUMENT SETUP (you probably will never write these things by hand, but it is nice and useful to know what they mean) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> HTML is one of the standards promoted by W3C (World Wide Web Consortium) http://w3c.com These lines certificate that your document comply with the standards VERY IMPORTANT for search engines and compatibility with many browsers
  • 23. HEADING (you probably will never write these things by hand, but it is nice and useful to know what they mean) <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> It describes the type of content of the page This format of description of contents in your page is very used and is called mime-type mime-types describe content in multiple places and are like type/specific-format For example: text/html image/jpeg image/png The second parameter (charset) indicates the type of characters that will be used in the page. If you don't know, use UTF-8 (an international set with accents etc.)
  • 24. HEADING <title>this is the title of my page</title> It is the title of the web page Appears on top of browser window Very important for search engines For SEO: use keywords in title and try to have the same keywords appear 4 or 5 times in the body of the page as well
  • 25. HEADING <meta name="description" content="a description" /> <meta name="keywords" content="some keywords" /> These two meta tags used to be very important for SEO, but now they are only used to see if they are coherent with the rest of your page (if you have “barak obama” as a keyword and “barak obama” is found nowhere in your website, it will result in a penalty on search engines) Description should be about 140-160 characters long Keywords are separated by commas (,) and should be around 6-12 You can use multiple words as keywords (for example “art”, “contemporary art” and “contemporary art in new york” are all valid keywords)
  • 26. HEADING <link rel="stylesheet" href="style.css" type="text/css" media="screen" /> It is the link to an external style sheet Try to use external style sheets, so you only write them once and use them in various pages External stylesheets are good also because they are put in the cache and so page loading time is better media parameter can show what this stylesheet is for: - “screen” will be used for output on monitor - “print” will be used when you print a webpage - “all” will be used on all media There are a lot more values --> look on w3c.com
  • 28. HTML is made of TAGS: <div ... > ... some content .... </ div> <br /> Tags are defined by angular parenthsis and they can surround some content (as in the first case) or they can be in a single part (as in the second case) Tags can have parameters, called attributes: <img src=”...the address of an image...” width=”100” height=”300” /> 'width=”100”' is an attribute of the img tag Tags can contain other tags (as in the first example on top of the slide)
  • 30. h1,h2,h3,h4,h5,h6 They are headings, they are used as titles, subtitles, sub-sub-titles etcetera H1 should be used only once per page (main title) H2 to h6 can be used as many times as you want, best if used in order ex.: h4 is subtitle of h3 which is subtitle of h2 <h2>title</h2 <h3>sub-title</h3> <h4>sub-sub-title</h4>
  • 31. Ordered (ol) and unordered (ul) lists, and list elements (li) Lists are very important and by manipulating them through CSS you can do all sorts of things (animated menus, pieces of interfaces...) that are also extremely well optimized for SEO purposes Unordered lists are bullet points <ul> <li>I am the first list element</li> <li>I am the secondlist element</li> </ul> Ordered lists are numbered sequences <ol> <li>i will be element number 1</li> <li>i will be element number 2</li> </ol>
  • 32. links <a href=”...internet address...” target=”_blank” title=”a title for the link”>CLICK</a> href: the internet address to which the link points target: where will the link open (_blank opens a new window, _self opens in the current window, if you specify a name, it opens a window with that name); it is an optional parameter title: sets a title for the link; good for SEO
  • 33. span and div The span and div tags are used to group things together, so that you can use them in CSS to create boxes, highlights, position them around the page, animate them etecetera. span is usually used in-line, for example to group a set of words together if you want to add a highlight to them In this sentence <span class=”highlighted-text”>these words are highlighted</span>. div is a block element, meaning that it represents an area of the screen <div class=”floater”>I can make the text in this DIV appear all over the page, wit CSS</div>
  • 34. A SET OF GREAT ADVICES: http://www.htmldog.com/guides/htmladvanced/recap/ Separating meaning and presentation HTML was never meant to be used for presentation, but user-agents incorporated elements that formatted text and developers found ways to manipulate layout. With the power of CSS it is now no longer necessary to style using HTML and meaning (HTML) can now be completely separated from presentation (CSS). There are a number of benefits to this - it should greatly decrease file sizes, it has the flexibility of a central style sheet that applies to the entire website rather than an individual page and it should also produce pages of much greater accessibility. Following this philosophy basically means you shouldn't style anything within the HTML. Tags such as font or attributes such as bgcolor should not be used. Even the border attribute inside an img tag is no longer valid in XHTML 1.1. This shouldn't be a problem - there is no styling that can be done in HTML that can't be done, and done better, with CSS. It isn't just about taking away the presentation from HTML, the application of meaning means specific HTML tags should be used when appropriate. For example, h1, h2 etc. should be used for headings - you should not just use CSS to make fonts larger. A good guide is to see if a visual browser, with its default styling, presents the document well without a style sheet. Tables should not be used for layout - tables are designed to display tabular data. This is perhaps the most difficult technique for experienced HTMLer's to get used to as it completely changes the way the HTML has traditionally been structured in the past. This approach greatly reduces the size of the page and, due to the resulting linear code, it becomes much more accessible. Tags In XHTML all tags should be lowercase and must be closed. For those tags that do not have closing tags (such as br and img), they must close themselves with a '/' at the end (such as <br />). Note that there should be a space before the forward-slash. The markup must be well formed, with elements properly nested (for example, <strong><em>this</em></strong>, not <strong><em>this</strong></em>). All documents must have html, head, title and body elements. They must also start with a document type declaration. The body of the document should start with p, h1, h2, h3, h4, h5, h6, div, pre, address, ins or del. Attributes All attributes must also be lowercase and their values in quotation marks. Minimized attributes are not allowed (such as <input type="checkbox" checked />). Traditionally minimized attributes must be given the value that is the same as the name of the attribute (such as <input type="checkbox" checked="checked" />). The name attribute is no longer valid (except in form elements) and should be replaced with id. The target attribute is not a valid attribute. Praise be. It was daft anyway. The alt attribute in the img tag is compulsory. Accessibility The reasons for making web pages accessible to users with disabilities are quite self-evident. Not only is it moralistic, but it will also benefit our future as web users grow older and the acuteness of the senses degenerates. Accessibility isn't just about accommodating people with severe disabilities, it is about making it easier for a great number of people with minor (predominantly visual) impairments. There are increasing legal implications such as the introduction of 'Section 508' in the US that makes a (half arsed) attempt to enforce certain accessibility initiatives and in the UK, all government websites must reach a specified degree of accessibility. How long until similar legislation is applied to general commercial websites, as it is for buildings? If you follow the above practices, your HTML should already be highly accessible to users with disabilities. There are further initiatives that can make your web pages even more accessible (for example, see the Accessible Links and Accessible Forms pages) and it really isn't that difficult.
  • 35. ANOTHER SET OF GREAT ADVICES: how to make links accessible http://www.htmldog.com/guides/htmladvanced/links/
  • 36. CSS
  • 37. How to apply CSS In-line (but don't use it) <p style="color: red">text</p> This will make that specific paragraph red. Embedded (but don't use this, too!), or internal styles are used for the whole page. Inside the head tags, the style tags surround all of the styles for the page. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>CSS Example</title> <style type="text/css"> p{ color: red; } a{ color: blue; } </style> ... This will make all of the paragraphs in the page red and all of the links blue.
  • 38. How to apply CSS External (use this!) External styles are used for the whole, multiple-page website. There is a separate CSS file, which will simply look something like: p{ color: red; } a{ color: blue; } If this file is saved as "web.css" then it can be linked to in the HTML like this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>CSS Example</title> <link rel="stylesheet" type="text/css" href="web.css" /> ...
  • 39. Selectors In CSS you apply style to elements you select from a HTML page body{ background: #000000; } means that the background of the page should be black div.top-block{ font-size: 12pt; } means that all the div elements with class=”top-block” will have a font of 12pt div#highlight-block{ color: #FFFF00; } means that the div element with id=”highlight-block” will have text colored in yellow
  • 40. Selectors from class and ID (continued) GROUPING If you have: h2 { color: red; } .thisOtherClass { color: red; } .yetAnotherClass { color: red; } You could make it: h2, .thisOtherClass, .yetAnotherClass { color: red; }
  • 41. Selectors from class and ID (continued) NESTING you can specify properties to selectors within other selectors. #top { background-color: #ccc; padding: 1em } #top h1 { color: #ff0; } #top p { color: red; font-weight: bold; } Removes the need for classes or ID's if it is applied to HTML that looks something like this: <div id="top"> <h1>Chocolate curry</h1> <p>This is my recipe for making curry purely with chocolate</p> <p>Mmm mm mmmmm</p> </div> This is because, by separating selectors with spaces, we are saying 'h1 inside ID top is colour #ff0' and 'p inside ID top is red and bold'. This can get quite complicated (because it can go for more than two levels, such as this inside this inside this inside this etc.) and may take a bit of practice.
  • 42. Selectors from class and ID (continued) Pseudo classes link is for an unvisited link. visited is for a link to a page that has already been visited. active is for a link when it is gains focus (for example, when it is clicked on). hover is for a link when the cursor is held over it. They are used with “ : “ to indicate them a.snowman:link { color: blue; } a.snowman:visited { color: purple; } a.snowman:active { color: red; } a.snowman:hover { text-decoration: none; color: blue; background-color: yellow; }
  • 43. Dimensions There are many property-specific units for values used in CSS, but there are some general units that are used in a number of properties and it is worth familiarising yourself with these before continuing. em (such as font-size: 2em) is the unit for the calculated size of a font. So "2em", for example, is two times the current font size. px (such as font-size: 12px) is the unit for pixels. pt (such as font-size: 12pt) is the unit for points. % (such as font-size: 80%) is the unit for... wait for it... percentages. Other units include pc (picas), cm (centimetres), mm (millimetres) and in (inches). When a value is zero, you do not need to state a unit. For example, if you wanted to specify no border, it would be border: 0.
  • 44. How to specify colours red Is the same as rgb(255,0,0) Which is the same as rgb(100%,0%,0%) Which is the same as #ff0000 Which is the same as #f00 There are 17 valid predefined colour names. They are aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, orange, purple, red, silver, teal, white, and yellow. transparent is also a valid value.
  • 45. How to specify colours The three values in the rbg value are from 0 to 255, 0 being the lowest level (for example no red), 255 being the highest level (for example full red). These values can also be a percentage. Hexadecimal (previously and more accurately known as 'sexadecimal') is a base-16 number system. We are generally used to the decimal number system (base-10, from 0 to 9), but hexadecimal has 16 digits, from 0 to f. The hex number is prefixed with a hash character (#) and can be three or six digits in length. Basically, the three-digit version is a compressed version of the six-digit (#f00 becomes #ff0000, #c96 becomes #cc9966 etc.). The three-digit version is easier to decipher (the first digit, like the first value in rgb, is red, the second green and the third blue) but the six-digit version gives you more control over the exact colour.
  • 46. How to specify colours h1 { color: #ffc; background-color: #009; } or h1 { color: blue; background-color: yellow; } or h1 { color: rgb(0,100,200); background-color: transparent; }
  • 47. TEXT font-family This is the font itself, such as Times New Roman, Arial, or Verdana. The font you specify must be on the user's computer, so there is little point in using obscure fonts. There are a select few 'safe' fonts (the most commonly used are arial, verdana and times new roman), but you can specify more than one font, separated by commas. The purpose of this is that if the user does not have the first font you specify, the browser will go through the list until it finds one it does have. This is useful because different computers sometimes have different fonts installed. So font-family: arial, helvetica for example, is used so that similar fonts are used on PC (which traditionally has arial, but not helvetica) and Apple Mac (which, traditionally, does not have arial and so helvetica, which it does normally have, will be used). Note: if the name of a font is more than one word, it should be put in quotation marks, such as font-family: "Times New Roman".
  • 48. TEXT font-size The size of the font. Be careful with this - text such as headings should not just be a paragraph in a large font; you should still use headings (h1, h2 etc.) even though, in practice, you could make the font-size of a paragraph larger than that of a heading (not recommended for sensible people).
  • 49. TEXT font-weight This states whether the text is bold or not. In practice this usually only works as font-weight: bold or font-weight: normal In theory it can also be bolder, lighter, 100, 200, 300, 400, 500, 600, 700, 800 or 900 but seeing as many browsers shake their heads and say "I don't think so", it's safer to stick with bold and normal.
  • 50. TEXT font-style This states whether the text is italic or not. It can be font-style: italic or font-style: normal text-decoration This states whether the text is underlined or not. This can be: text-decoration: overline, which places a line above the text. text-decoration: line-through, strike-through, which puts a line through the text. text-decoration: underline should only be used for links because users generally expect underlined text to be links. This property is usually used to decorate links, such as specifying no underline with text-decoration: none
  • 51. TEXT text-transform text-transform: capitalize turns the first letter of every word into uppercase. text-transform: uppercase turns everything into uppercase. text-transform: lowercase turns everything into lowercase. text-transform: none does not apply any transform. TEXT SPACING The letter-spacing and word-spacing properties are for spacing between letters or words. The value can be a length or normal. The line-height property sets the height of the lines in an element, such as a paragraph, without adjusting the size of the font. It can be a number (which specifies a multiple of the font size, so '2' will be two times the font size, for example), a length, a percentage or normal. The text-align property will align the text inside an element to left, right, center or justify. The text-indent property will indent the first line of a paragraph, for example, to a given length or percentage.
  • 52. MARGIN and PADDING margin and padding are the two most commonly used properties for spacing- out elements. A margin is the space outside of the element, whereas padding is the space inside the element. h2 { font-size: 1.5em; background-color: #ccc; margin: 1em; padding: 3em; } You will see that this leaves one-character width space around the secondary header and the header itself is fat from the three-character width padding. The four sides of an element can also be set individually with these CSS properties margin-top, margin-right, margin-bottom, margin-left, padding-top, padding-right, padding-bottom and padding-left
  • 53. BORDER To make a border around an element, all you need is border-style. The values can be solid, dotted, dashed, double, groove, ridge, inset and outset. border-width sets the width of the border, which is usually in pixels. There are also properties for border-top-width, border-right-width, border-bottom-width and border-left-width border-color sets the colour. h2 { border-style: dashed; border-width: 3px; border-left-width: 10px; border-right-width: 10px; border-color: red; } This will make a red dashed border around all HTML secondary headers (the h2 element) that is 3 pixels wide on the top and bottom and 10 pixels wide on the left and right (these having over-ridden the 3 pixel wide width of the entire border).
  • 54. Background images body { background: white url(http://www.htmldog.com/images/bg.gif) no-repeat top right; } This amalgamates these properties: background-color, is the color of the background where there is no image. background-image, is the internet address of the image. background-repeat, is how the image repeats itself. This can be repeat (equivalent to a 'tile' effect across the whole background), repeat-y (repeating on the 'y-axis', above and below), repeat-x (repeating on the 'x-axis', side-by-side) or no-repeat (which shows just one instance of the image). background-position, which can be top, center, bottom, left, right or any sensible combination, such as above. Background-images can be used in most HTML elements - not just for the whole page (body) and can be used for simple but effective results, such as shaped corners.
  • 55. Display property inline elements are displayed inline to follow the flow of a line. block puts a line break before and after the element. none doesn't display the element div.blocks-to-be-hidden{ display: none; } (all these blocks will be hidden)
  • 56. Position The position property is used to define whether an element is absolute, relative, static or fixed. The value static is the default value for elements and renders the position in the normal order of things, as they appear in the HTML. relative is much like static, but the element can be offset from its original position with the properties top, right, bottom and left. absolute pulls an element out of the normal flow of the HTML and delivers it to a world all of its own. In this crazy little world, the absolute element can be placed anywhere on the page using top, right, bottom and left. fixed behaves like absolute, but it will absolutely position an element in reference to the browser window as opposed to the web page, so, theoretically, fixed elements should stay exactly where they are on the screen even when the page is scrolled. Why theoretically? Why else - this works great in browsers such as Mozilla and Opera, but in IE it doesn't work at all.
  • 57. Floating Floating an element will shift it to the right or left of a line, with surrounding content flowing around it. Floating is normally used to position smaller elements within a page, but it can also be used with bigger chunks, such as navigation columns. Taking the HTML example below, you could apply the following CSS: #navigation { float: left; width: 10em; } #navigation2 { float: right; width: 10em; }
  • 58. Media Types The media at-rule will apply its contents to a specified media, such as print. For example: @media print { body { font-size: 10pt; font-family: times new roman, times, serif; } #navigation { display: none; } } The media-type can be: all - for every media under, over, around and in the sun. aural - for speech synthesizers. handheld - for handheld devices. print - for printers. projection - for projectors. screen - for computer screens. You can also use braille, embossed, tty or tv
  • 60. http://www.w3.org/ The World Wide Web Consortium (standards, reference, guides) http://www.projectseven.com/tutorials/index.htm Tutorials http://www.bluerobot.com/web/layouts/ Simple layouts using CSS http://www.glish.com/css/ CSS techniques http://realworldstyle.com/ CSS tricks http://www.csszengarden.com/ Learn how CSS can radically change a website
  • 61. TO DO
  • 62. TAKE THIS SIMPLE WEBPAGE AND MAKE IT BEAUTIFUL USING CSS (note: you have to add the link to the CSS file as shown in the first slides) <html> <head> <title>This website is beautiful</title> </head> <body> <div id="container"> <div id="first-block"> <div class="testo">THIS</div> </div> <div id="second-block"> <div class="testo">WEBSITE</div> </div> <div id="third-block"> <div class="testo">IS BEAUTIFUL</div> </div> </div> </body> </html>