Folien



(letzte Synchronisation der PDF-Präsentation: 02.03.2017)

Falls keine PDF-Präsentation zu sehen ist, klicken Sie zum Download hier: Direktdownload PDF-Präsentation

Übungen

Alle Übungen finden Sie in der Materialsammlung (dort auch alle zusätzlichen Dateien wie Bilder, Klassendiagramme oder HTML-Vorlagen!).

Die aktuelle Übung können Sie hier als txt-File herunterladen.


***** Übungen: CSS - Anfang *****

CSS_1-1: Trennung von Form und Inhalt


Welche der folgenden Arbeitsschritte führen Sie mit HTML aus, welche mit CSS?


1. Schriftgröße ändern.
2. Einen Absatz rechts ausrichten.
3. Ein Wort unterstreichen.
4. Einen Text als Absatz formatieren.
5. Einen Text als Tabelle formatieren.
6. Eine Liste erstellen.
7. Eine nummerierte Liste erstellen.
8. Einen Rahmen um einen Text ziehen.
9. Ein Bild mit einem blauen Rahmen versehen.
10. Ein Bild einfügen.
11. Einem Bild einen Alternativtext (alt-Tag) geben.





CSS_1-2: CSS-Zengarden

In Datei
css01-UE1-zengardenv1.html

ist der Original-Quellcode von CSS Zen Garden festgehalten. In einer der Dateien

css01-UE1-zengardenv2.html
css01-UE1-zengardenv3.html

wurde (jeweils ziemlich weit oben in der Datei) das Layout verändert, in der anderen zwar nicht das Layout, aber der Inhalt. Welche Datei war das?

css01-UE1-zengardenv1.html
HTML-Code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" > <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <meta name="author" content="Dave Shea" /> <meta name="keywords" content="design, css, cascading, style, sheets, xhtml, graphic design, w3c, web standards, visual, display" /> <meta name="description" content="A demonstration of what can be accomplished visually through CSS-based design." /> <meta name="robots" content="all" /> <title>css Zen Garden: The Beauty in CSS Design</title>   <!-- to correct the unsightly Flash of Unstyled Content. http://www.bluerobot.com/web/css/fouc.asp --> <script type="text/javascript"></script>   <style type="text/css" title="currentStyle" media="screen"> @import "/001/001.css"; </style> <link rel="Shortcut Icon" type="image/x-icon" href="http://www.csszengarden.com/favicon.ico" /> <link rel="alternate" type="application/rss+xml" title="RSS" href="http://www.csszengarden.com/zengarden.xml" /> </head>   <!--   This xhtml document is marked up to provide the designer with the maximum possible flexibility. There are more classes and extraneous tags than needed, and in a real world situation, it's more likely that it would be much leaner.   However, I think we can all agree that even given that, we're still better off than if this had been built with tables.   -->   <body id="css-zen-garden">   <div id="container"> <div id="intro"> <div id="pageHeader"> <h1><span>css Zen Garden</span></h1> <h2><span>The Beauty of <acronym title="Cascading Style Sheets">CSS</acronym> Design</span></h2> </div>   <div id="quickSummary"> <p class="p1"><span>A demonstration of what can be accomplished visually through <acronym title="Cascading Style Sheets">CSS</acronym>-based design. Select any style sheet from the list to load it into this page.</span></p> <p class="p2"><span>Download the sample <a href="/zengarden-sample.html" title="This page's source HTML code, not to be modified.">html file</a> and <a href="/zengarden-sample.css" title="This page's sample CSS, the file you may modify.">css file</a></span></p> </div>   <div id="preamble"> <h3><span>The Road to Enlightenment</span></h3> <p class="p1"><span>Littering a dark and dreary road lay the past relics of browser-specific tags, incompatible <acronym title="Document Object Model">DOM</acronym>s, and broken <acronym title="Cascading Style Sheets">CSS</acronym> support.</span></p> <p class="p2"><span>Today, we must clear the mind of past practices. Web enlightenment has been achieved thanks to the tireless efforts of folk like the <acronym title="World Wide Web Consortium">W3C</acronym>, <acronym title="Web Standards Project">WaSP</acronym> and the major browser creators.</span></p> ...  

css01-UE1-zengardenv2.html
HTML-Code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" > <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <meta name="author" content="Dave Shea" /> <meta name="keywords" content="design, css, cascading, style, sheets, xhtml, graphic design, w3c, web standards, visual, display" /> <meta name="description" content="A demonstration of what can be accomplished visually through CSS-based design." /> <meta name="robots" content="all" /> <title>css Zen Garden: The Beauty in CSS Design</title>   <!-- to correct the unsightly Flash of Unstyled Content. http://www.bluerobot.com/web/css/fouc.asp --> <script type="text/javascript"></script>   <style type="text/css" title="currentStyle" media="screen"> @import "/001/001.css"; </style> <link rel="Shortcut Icon" type="image/x-icon" href="http://www.csszengarden.com/favicon.ico" /> <link rel="alternate" type="application/rss+xml" title="RSS" href="http://www.csszengarden.com/zengarden.xml" /> </head>   <!--   This xhtml document is marked up to provide the designer with the maximum possible flexibility. There are more classes and extraneous tags than needed, and in a real world situation, it's more likely that it would be much leaner.   However, I think we can all agree that even given that, we're still better off than if this had been built with tables.   -->   <body id="css-zen-garden">   <div id="container"> <div id="intro"> <div id="pageHeader"> <h1><span>I AM A CSS-FREAK</span></h1> <h2><span>Die Schönheit von <acronym title="Cascading Style Sheets">CSS</acronym> Design</span></h2> </div>   <div id="quickSummary"> <p class="p1"><span>A demonstration of what can be accomplished visually through <acronym title="Cascading Style Sheets">CSS</acronym>-based design. Select any style sheet from the list to load it into this page.</span></p> <p class="p2"><span>Download the sample <a href="/zengarden-sample.html" title="This page's source HTML code, not to be modified.">html file</a> and <a href="/zengarden-sample.css" title="This page's sample CSS, the file you may modify.">css file</a></span></p> </div>   <div id="preamble"> <h3><span>The Road to Enlightenment</span></h3> <p class="p1"><span>Littering a dark and dreary road lay the past relics of browser-specific tags, incompatible <acronym title="Document Object Model">DOM</acronym>s, and broken <acronym title="Cascading Style Sheets">CSS</acronym> support.</span></p> <p class="p2"><span>Today, we must clear the mind of past practices. Web enlightenment has been achieved thanks to the tireless efforts of folk like the <acronym title="World Wide Web Consortium">W3C</acronym>, <acronym title="Web Standards Project">WaSP</acronym> and the major browser creators.</span></p> ...  

css01-UE1-zengardenv3.html
HTML-Code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" > <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <meta name="author" content="Dave Shea" /> <meta name="keywords" content="design, css, cascading, style, sheets, xhtml, graphic design, w3c, web standards, visual, display" /> <meta name="description" content="A demonstration of what can be accomplished visually through CSS-based design." /> <meta name="robots" content="all" /> <title>css Zen Garden: The Beauty in CSS Design</title>   <!-- to correct the unsightly Flash of Unstyled Content. http://www.bluerobot.com/web/css/fouc.asp --> <script type="text/javascript"></script>   <style type="text/css" title="currentStyle" media="screen"> @import "/001/001.css"; </style> <link rel="Shortcut Icon" type="image/x-icon" href="http://www.csszengarden.com/favicon.ico" /> <link rel="alternate" type="application/rss+xml" title="RSS" href="http://www.csszengarden.com/zengarden.xml" /> </head>   <!--   This xhtml document is marked up to provide the designer with the maximum possible flexibility. There are more classes and extraneous tags than needed, and in a real world situation, it's more likely that it would be much leaner.   However, I think we can all agree that even given that, we're still better off than if this had been built with tables.   -->   <body id="css-zen-garden">   <div id="container"> <div id="intro"> <div style="margin : auto;"> <h1><span>css Zen Garden</span></h1> <h2><span>The Beauty of <acronym title="Cascading Style Sheets">CSS</acronym> Design</span></h2> </div>   <div id="quickSummary"> <p class="p1"><span>A demonstration of what can be accomplished visually through <acronym title="Cascading Style Sheets">CSS</acronym>-based design. Select any style sheet from the list to load it into this page.</span></p> <p class="p2"><span>Download the sample <a href="/zengarden-sample.html" title="This page's source HTML code, not to be modified.">html file</a> and <a href="/zengarden-sample.css" title="This page's sample CSS, the file you may modify.">css file</a></span></p> </div>   <div id="preamble"> <h3><span>The Road to Enlightenment</span></h3> <p class="p1"><span>Littering a dark and dreary road lay the past relics of browser-specific tags, incompatible <acronym title="Document Object Model">DOM</acronym>s, and broken <acronym title="Cascading Style Sheets">CSS</acronym> support.</span></p> <p class="p2"><span>Today, we must clear the mind of past practices. Web enlightenment has been achieved thanks to the tireless efforts of folk like the <acronym title="World Wide Web Consortium">W3C</acronym>, <acronym title="Web Standards Project">WaSP</acronym> and the major browser creators.</span></p>   ...