# Motivating separation of content and layout
## Obiettivi di apprendimento

* See the problems with inline styles
* Understand that a style sheet gives you freedom
* being able to explain people why they should use style sheets

## Trascrizione

We have now learned about HTML document structures and also about HTML options for formatting. But, what do we now need style sheets for and why do we distinguish between document structure and document layout? Isn't this much more practical, right to the point and easier to handle both together? Yes, to some very limited extent it is, but there are some issues that arise quickly:
* Consistency of Layout: It is very difficult to remember and maintain consistency of layout (e.g. always use italics for emphasis instead of bold face) over a longer time of working. When you collaborate on a text, it is practically speaking even infeasible. It is much simpler to provide structure (emphasize) and factor out the decision how to convey the corresponding notion through layout (e.g. italics)
* Expertise: The content expert is typically not an expert for layout and vice versa. Even if one person does both, the person may learn over time about content vs layout at different speeds leading to the next issue of
* Change of Layout: Layout and content tend to develop in different cycles. You may decide for a new text and maintain existing layout. Or you may change your layout, but maintain existing content. Hence, it is good practice to separate the two.
* Adaptability: Some users have a big screen, others have only a tiny device. What a heading is, is not altered by a different device, but how to display it may change. Knowing about a certain font size, however, does not identify a heading.
* Personalizability: Some users have perfect eye sight, others may be color blind or their eye sight may be even more challenged. Determining colors to be red and green may prevent color-blind people from understanding the content. But, they might decide to go for certain color options in their browser.
* Repurposing: Even a single user may have varying requirements, for instance depending on whether he wants to print content or view it on screen.
Rule of thumb: People who are serious about publishing use style sheets.

## Quiz

Web Science/Part1: Foundations of the web/Web content/Motivating separation of content and layout/quiz

## Discussioni

* Ethernet
** Communication over a shared Medium
** Ethernet header
** Minimum package length vs maximum cable length
** Collision detection
** Summary, further reading, homework
* Internet Protocol
** Motivation for IP
** Classful IPv4 networks
** IP forwarding algorithm
** IP header
** Summary, further reading, homework
* Transmission Control Protocol
** End to end principle and connection oriented communication
** Three way handshake
** Port numbers
** Sliding window and flow control
** Summary, further reading, homework
* Domain Name System
** Tree structure
** Terminology
** Zones
** Review some facts about DNS
** Delegating DNS queries
** DNS address resolution
** Summary, further reading, homework
* Internet vs World Wide Web
** Summary of the internet architecture
** Motivation and requirements for the World Wide Web
** Design principles of the web
** Uniform Resource Identifier
** Summary, further reading, homework
* Hypertext Transfer Protocol
** Making HTTP requests
** A simple web client
** A simple web server
** HTTP header
** Content negotiation
** Summary, further reading, homework
* Web content
** Problem setting for web content formats
** Working with XML
** HTML for web document structures
** Layout elements in HTML
** Motivating separation of content and layout
** Cascading Style Sheets
** Media content
** Metadata
** Summary, further reading, homework
* Dynamic Web Content
** Basics of server side web programming
** Forms and HTTP post request
** Handling a post request in a Java Servlet
** Client side JavaScript
** Ajax and the XMLHttpRequest class
** Summary, further reading, homework