SlideShare una empresa de Scribd logo
1 de 34
XHTML 2 MDST 3559:  DataestheticsProf. Alvarado02/03/2011
Business Regarding “Assignments” During the Basic Skills segment of the course, assignments will be given each Thursday to be due the following Monday Except for Week 7, where the assignment will be handed out on Tuesday and due Thursday
Review Documents have three layers: content, structure, and layout. Structure consists of elementsand relationships Relationships can be trees or networks. Markup languages describe this structure for computational use XML is a general markup language or “metalanguage.” HTML is a specific markup language. designed for created networked hypermedia documents.
How does HTML support trees? Networks?
Trees as nested document elements, e.g. P, TABLE, ULNetworks as hypertext elements, e.g. A, IMG
Overview Today we ... Continue with our learning of HTML Enhance jEdit with plugins Install an FTP client to upload images Create pages on STUDIO1 accounts Learn basic CSS
jEdit Add plugins to your editor Go to “Plugins > Plugin Manager ...” to open dialog box. Select “Install” tab. Select the following: FTP  InfoViewer PHPParser Sidekick XML XML Indenter CSS Editor Press the “Install” button.
Testing jEdit Use jEdit to log in to your STUDIO1 account STUDIO1 is a server set up for this class	 Address: studio1.shanti.virginia.edu Do this: Go go “File > Open” (or press Ctrl-O or use icon) Select “Plugins > FTP > Secure FTP Server” as the very top Data to use Remote host: see above User name: your UVA user id Password: your blue unix password Leave the rest as is and press “OK” Click on the public_html and then “index.html”
Install an test FTP client If you do not have one, use FileZilla See post on course site for URL Open FileZilla Go to “File > Site Manager” and select “New Site” Call the site “STUDIO1” Set the following: Host: studio1.shanti.virginia.edu (same as before) Servertype: SFTP Logontype: Normal User and password same as before
FTP Client Inspect items on left and right windows These are the file systems on your laptop and the server  Become familiar with this structure About the terms “client” and “server” Client refers to software on the client machine Server refers to software on the server machine Networked applications have client and server components WWW, MySQL, FTP, etc. “Remote” and “Local” are related terms
About Addresses This FTP location ... sftp://studio1.shanti.virginia.edu /home/USERID/public_html ... maps onto this web location http://studio1.shanti.virginia.edu/~USERID Note: Different protocol prefixes: http vssftp Same machine addresses: studio1 ... Different paths (but which map): /~rca2t  /home/rca2t/public_html
Exercise 1: Hello, World You already have an index page in your site. The URL for the page is: http://studio1.shanti.virginia.edu/~userid/ index.html is a the default page for your site; it does not need to be specified Convert this page into a standard HTML page with the following structure: html head title body h1 p Give it a title “Hello, World” and and use this as the H1 text
Exercise 2: Add a link Create a new page. In jEdit, press Ctrl-N and then save the file as “page2.html” or something. Save the file – using Ctrl-S – noting that it allows you to save your new file in the remote directory. Create a link (aka anchor) from index.html to page2.html
Exercise 3: Add an image Download an image from the internet Upload to your site using FTP In index.html, create an image element (IMG) and use the uploaded filename as the source (SRC) attribute Create a link from the image to the second page you created.
Exercise 4: Create a table In your second page, add a table element and use it to organize two images A table has the following structure: <table> <tr> <td>STUFF GOES HERE</td> <td>STUFF GOES HERE</td> </tr> </table>
CSS Adding Style
CSS “Cascading Style Sheets” Allows you to add styles to HTML Each level has its language ... Styles include: Font characteristics Line characteristics Text block  Background colors and images Etc.
<html> 	<head> 		<title>I’m an HTML document</title> 	</head> 	<body> 		<h1>Here is the first header</h1> 		<p>Here is some conent</p> 	</body> </html> Standard HTML Doc
<html> 	<head> 		<title>I’m an HTML document</title> 	</head> 	<body> 		<h1>Here is the first header</h1> 		<p>Here is some content:</p> <h1> <p>Some Text I want to emphasize.</p> </h1> 	</body> </html> What not to do!
<html> 	<head> 		<title>I’m an HTML document</title> 	</head> 	<body> 		<h1>Here is the first header</h1> 		<p>Here is some conent</p> 		<div style=“font-size:14pt;"> <p>Some Text I want to emphasize.</p> </div> 	</body> </html> Instead, use CSS
<html> 	<head> 		<title>I’m an HTML document</title> <style type="text/css"> 		div { font-size:14pt; 			font-weight:bold; 		} 		</style> 	</head> 	<body> 		<h1>Here is the first header</h1> 		<p>Here is some conent</p> 		<div> 	<p>Some Text I want to emphasize.</p> </div> 	</body> </html> Better yet, put CSS here
<html> 	<head> 		<title>I’m an HTML document</title> <style type="text/css"> 		.foo { font-size:14pt; 			font-weight:bold; 		} 		</style> 	</head> 	<body> 		<h1>Here is the first header</h1> 		<p>Here is some conent</p> 		<div class=“foo”> <p>Some Text I want to emphasize.</p> </div> 	</body> </html> with CSS in header using class attribute
<html> 	<head> 		<title>I’m an HTML document</title> <link rel=“stylesheet” type=“text/css” href=“default.css” /> 	</head> 	<body> 		<h1>Here is the first header</h1> 		<p>Here is some conent</p> 		<div> <p>Some Text I want to emphasize.</p> </div> 	</body> </html> Even better: CSS in linked file
default.css .foo { 	font-size:14pt; 	font-weight:bold; } This is what the content of the default.css file would look like.
CSS Syntax: Selectors .foo { 	font-size:14pt; 	font-weight:bold; } The “selector” indicates what elements the styles apply to.  Can address element names, classes, and ID.
CSS Syntax: Selectors #foo { 	font-size:14pt; 	font-weight:bold; } Here the selector finds an element with an ID attribute with the value “foo” … e.g. <div id=“foo”>Hey.</div>
Example selectors p			Any p element			 p.foo	Any p element with a class of foo .foo	Any element with a class of foo #foo	The element with an id of foo
CSS Syntax: Declarations .foo { 	font-size:14pt; 	font-weight:bold; } The “declarations” specify properties and values to apply to the element. Form =property-name: value;
Example Directives font-family: Georgia, Garamond, serif; color: blue; color: #eeff99; background-color: gray; border: 1px solid black; padding: 5px; margin: 5px;
Basic Idea A CSS file is just a series of “rules” A CSS rule has two parts	 A selector to identify elements (tag name, class, id) One or more declarations of style CSS rules have a simple syntax Selectors followed by curly braces Key/value pairs separated by colons Rules separated by semi-colons
Basic idea You can apply any number of rules to a document Rules may appear in attributes, headers, or external files Rules are “cascaded” Later ones inherit previous ones Later ones have precedence (can overwrite) earlier ones
Exercise 4: Adding Style Create a style element in the head of your first page <style type=“text/css”> body { 	... } </style> Change the background color of your page Use the CSS list in today’s materials Change the font of your header
Exercise 5: Create a separate stylesheet Create a new page in jEdit called “default.css” Cut and paste the contents of your STYLE element into your new css file Create a LINK element in the HEAD of each document and link to this stylesheet <link rel=“stylesheet” type=“text/css” href=“default.css” /> Remove the STYLE elements from the HEAD of your page
Assignment (to be posted) Create a page collection in your STUDIO1 directory with the following items: Main page 		 main1.html Topic page 1 	 main1-topic1.html Topic page 2 	 main1-topic2.html For each page, create a TITLE element and an H1 element, titling each page as your wish. In Topic page 1 Embed two visualizations Write 250 words of context In Topic page 2 Create a gallery of 4 images using a 2 x 2 tables Create a common style sheet for each page and define font and color styles for the following elements: BODY, H1, and P Create a common menu in each page that links to the other pages

Más contenido relacionado

La actualidad más candente

Unit ii java script and xhtml documents and dynamic documents with javascript
Unit ii java script and xhtml documents and dynamic documents with javascriptUnit ii java script and xhtml documents and dynamic documents with javascript
Unit ii java script and xhtml documents and dynamic documents with javascriptzahid7578
 
Css presentation lecture 1
Css presentation lecture 1Css presentation lecture 1
Css presentation lecture 1Mudasir Syed
 
Lecture 4 - Adding XTHML for the Web
Lecture  4 - Adding XTHML for the WebLecture  4 - Adding XTHML for the Web
Lecture 4 - Adding XTHML for the Webphanleson
 
Web I - 02 - XHTML Introduction
Web I - 02 - XHTML IntroductionWeb I - 02 - XHTML Introduction
Web I - 02 - XHTML IntroductionRandy Connolly
 
Web programming unit IIII XML &DOM NOTES BY BHAVSINGH MALOTH
Web programming unit IIII XML &DOM NOTES BY BHAVSINGH MALOTHWeb programming unit IIII XML &DOM NOTES BY BHAVSINGH MALOTH
Web programming unit IIII XML &DOM NOTES BY BHAVSINGH MALOTHBhavsingh Maloth
 
Usability and accessibility on the web
Usability and accessibility on the webUsability and accessibility on the web
Usability and accessibility on the webVlad Posea
 
Xml tutorial
Xml tutorialXml tutorial
Xml tutorialIT
 
Easy steps to convert your content to structured (frame maker and xml)
Easy steps to convert your content to structured (frame maker and xml)Easy steps to convert your content to structured (frame maker and xml)
Easy steps to convert your content to structured (frame maker and xml)Publishing Smarter
 
Web programming by Najeeb ullahAzad(1)
Web programming by Najeeb ullahAzad(1)Web programming by Najeeb ullahAzad(1)
Web programming by Najeeb ullahAzad(1)azadmcs
 
Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xmlGtu Booker
 

La actualidad más candente (20)

Unit ii java script and xhtml documents and dynamic documents with javascript
Unit ii java script and xhtml documents and dynamic documents with javascriptUnit ii java script and xhtml documents and dynamic documents with javascript
Unit ii java script and xhtml documents and dynamic documents with javascript
 
Xhtml
XhtmlXhtml
Xhtml
 
Design Tools Html Xhtml
Design Tools Html XhtmlDesign Tools Html Xhtml
Design Tools Html Xhtml
 
Css presentation lecture 1
Css presentation lecture 1Css presentation lecture 1
Css presentation lecture 1
 
Lecture 4 - Adding XTHML for the Web
Lecture  4 - Adding XTHML for the WebLecture  4 - Adding XTHML for the Web
Lecture 4 - Adding XTHML for the Web
 
Xhtml
XhtmlXhtml
Xhtml
 
Web I - 02 - XHTML Introduction
Web I - 02 - XHTML IntroductionWeb I - 02 - XHTML Introduction
Web I - 02 - XHTML Introduction
 
XML Introduction
XML IntroductionXML Introduction
XML Introduction
 
Wp unit 1 (1)
Wp  unit 1 (1)Wp  unit 1 (1)
Wp unit 1 (1)
 
Web programming unit IIII XML &DOM NOTES BY BHAVSINGH MALOTH
Web programming unit IIII XML &DOM NOTES BY BHAVSINGH MALOTHWeb programming unit IIII XML &DOM NOTES BY BHAVSINGH MALOTH
Web programming unit IIII XML &DOM NOTES BY BHAVSINGH MALOTH
 
Usability and accessibility on the web
Usability and accessibility on the webUsability and accessibility on the web
Usability and accessibility on the web
 
Wp unit III
Wp unit IIIWp unit III
Wp unit III
 
XHTML
XHTMLXHTML
XHTML
 
Html
HtmlHtml
Html
 
Xml tutorial
Xml tutorialXml tutorial
Xml tutorial
 
Easy steps to convert your content to structured (frame maker and xml)
Easy steps to convert your content to structured (frame maker and xml)Easy steps to convert your content to structured (frame maker and xml)
Easy steps to convert your content to structured (frame maker and xml)
 
Web programming by Najeeb ullahAzad(1)
Web programming by Najeeb ullahAzad(1)Web programming by Najeeb ullahAzad(1)
Web programming by Najeeb ullahAzad(1)
 
01 Xml Begin
01 Xml Begin01 Xml Begin
01 Xml Begin
 
Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xml
 
XML
XMLXML
XML
 

Destacado

Mdst 3559-03-03-sql-php-2
Mdst 3559-03-03-sql-php-2Mdst 3559-03-03-sql-php-2
Mdst 3559-03-03-sql-php-2Rafael Alvarado
 
Mdst3559 2011-05-03-final-day
Mdst3559 2011-05-03-final-dayMdst3559 2011-05-03-final-day
Mdst3559 2011-05-03-final-dayRafael Alvarado
 
Mdst 3559-01-27-data-journalism-studio
Mdst 3559-01-27-data-journalism-studioMdst 3559-01-27-data-journalism-studio
Mdst 3559-01-27-data-journalism-studioRafael Alvarado
 
Mdst 3559-04-05-networks-and-graphs
Mdst 3559-04-05-networks-and-graphsMdst 3559-04-05-networks-and-graphs
Mdst 3559-04-05-networks-and-graphsRafael Alvarado
 
UVA MDST 3073 Texts and Models-2012-09-11
UVA MDST 3073 Texts and Models-2012-09-11UVA MDST 3073 Texts and Models-2012-09-11
UVA MDST 3073 Texts and Models-2012-09-11Rafael Alvarado
 

Destacado (8)

Mdst 3559-03-03-sql-php-2
Mdst 3559-03-03-sql-php-2Mdst 3559-03-03-sql-php-2
Mdst 3559-03-03-sql-php-2
 
Mdst3559 2011-05-03-final-day
Mdst3559 2011-05-03-final-dayMdst3559 2011-05-03-final-day
Mdst3559 2011-05-03-final-day
 
Mdst 3559-01-27-data-journalism-studio
Mdst 3559-01-27-data-journalism-studioMdst 3559-01-27-data-journalism-studio
Mdst 3559-01-27-data-journalism-studio
 
MDST 3703 F10 Studio 11
MDST 3703 F10 Studio 11MDST 3703 F10 Studio 11
MDST 3703 F10 Studio 11
 
MDST 3703 F10 Seminar 1
MDST 3703 F10 Seminar 1MDST 3703 F10 Seminar 1
MDST 3703 F10 Seminar 1
 
Mdst 3559-04-05-networks-and-graphs
Mdst 3559-04-05-networks-and-graphsMdst 3559-04-05-networks-and-graphs
Mdst 3559-04-05-networks-and-graphs
 
UVA MDST 3073 Texts and Models-2012-09-11
UVA MDST 3073 Texts and Models-2012-09-11UVA MDST 3073 Texts and Models-2012-09-11
UVA MDST 3073 Texts and Models-2012-09-11
 
Mdst 3559-02-17-php2
Mdst 3559-02-17-php2Mdst 3559-02-17-php2
Mdst 3559-02-17-php2
 

Similar a Mdst 3559-02-01-html (20)

(Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS (Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS
 
CustomizingStyleSheetsForHTMLOutputs
CustomizingStyleSheetsForHTMLOutputsCustomizingStyleSheetsForHTMLOutputs
CustomizingStyleSheetsForHTMLOutputs
 
HTML/CSS Lecture 1
HTML/CSS Lecture 1HTML/CSS Lecture 1
HTML/CSS Lecture 1
 
Week 2-intro-html
Week 2-intro-htmlWeek 2-intro-html
Week 2-intro-html
 
Session ii(html)
Session ii(html)Session ii(html)
Session ii(html)
 
HTML & CSS Workshop Notes
HTML & CSS Workshop NotesHTML & CSS Workshop Notes
HTML & CSS Workshop Notes
 
Html5 tutorial
Html5 tutorialHtml5 tutorial
Html5 tutorial
 
Html5 tutorial
Html5 tutorialHtml5 tutorial
Html5 tutorial
 
Html5 tutorial
Html5 tutorialHtml5 tutorial
Html5 tutorial
 
Html5 tutorial
Html5 tutorialHtml5 tutorial
Html5 tutorial
 
Html5 tutorial
Html5 tutorialHtml5 tutorial
Html5 tutorial
 
Uta005 lecture2
Uta005 lecture2Uta005 lecture2
Uta005 lecture2
 
Before start
Before startBefore start
Before start
 
Html
HtmlHtml
Html
 
Xml
XmlXml
Xml
 
Xml
XmlXml
Xml
 
XHTML and CSS
XHTML and CSS XHTML and CSS
XHTML and CSS
 
Web Designing
Web DesigningWeb Designing
Web Designing
 
Essential html tweaks for accessible themes
Essential html tweaks for accessible themesEssential html tweaks for accessible themes
Essential html tweaks for accessible themes
 
Markup For Dummies (Russ Ward)
Markup For Dummies (Russ Ward)Markup For Dummies (Russ Ward)
Markup For Dummies (Russ Ward)
 

Más de Rafael Alvarado

Mdst3703 2013-10-08-thematic-research-collections
Mdst3703 2013-10-08-thematic-research-collectionsMdst3703 2013-10-08-thematic-research-collections
Mdst3703 2013-10-08-thematic-research-collectionsRafael Alvarado
 
Mdst3703 2013-10-01-hypertext-and-history
Mdst3703 2013-10-01-hypertext-and-historyMdst3703 2013-10-01-hypertext-and-history
Mdst3703 2013-10-01-hypertext-and-historyRafael Alvarado
 
Mdst3703 2013-09-24-hypertext
Mdst3703 2013-09-24-hypertextMdst3703 2013-09-24-hypertext
Mdst3703 2013-09-24-hypertextRafael Alvarado
 
Mdst3703 2013-09-12-semantic-html
Mdst3703 2013-09-12-semantic-htmlMdst3703 2013-09-12-semantic-html
Mdst3703 2013-09-12-semantic-htmlRafael Alvarado
 
Mdst3703 2013-09-17-text-models
Mdst3703 2013-09-17-text-modelsMdst3703 2013-09-17-text-models
Mdst3703 2013-09-17-text-modelsRafael Alvarado
 
Mdst3703 2013-09-10-textual-signals
Mdst3703 2013-09-10-textual-signalsMdst3703 2013-09-10-textual-signals
Mdst3703 2013-09-10-textual-signalsRafael Alvarado
 
Mdst3703 2013-09-05-studio2
Mdst3703 2013-09-05-studio2Mdst3703 2013-09-05-studio2
Mdst3703 2013-09-05-studio2Rafael Alvarado
 
Mdst3703 2013-09-03-plato2
Mdst3703 2013-09-03-plato2Mdst3703 2013-09-03-plato2
Mdst3703 2013-09-03-plato2Rafael Alvarado
 
Mdst3703 2013-08-29-hello-world
Mdst3703 2013-08-29-hello-worldMdst3703 2013-08-29-hello-world
Mdst3703 2013-08-29-hello-worldRafael Alvarado
 
UVA MDST 3703 2013 08-27 Introduction
UVA MDST 3703 2013 08-27 IntroductionUVA MDST 3703 2013 08-27 Introduction
UVA MDST 3703 2013 08-27 IntroductionRafael Alvarado
 
MDST 3705 2012-03-05 Databases to Visualization
MDST 3705 2012-03-05 Databases to VisualizationMDST 3705 2012-03-05 Databases to Visualization
MDST 3705 2012-03-05 Databases to VisualizationRafael Alvarado
 
Mdst3705 2013-02-26-db-as-genre
Mdst3705 2013-02-26-db-as-genreMdst3705 2013-02-26-db-as-genre
Mdst3705 2013-02-26-db-as-genreRafael Alvarado
 
Mdst3705 2013-02-19-text-into-data
Mdst3705 2013-02-19-text-into-dataMdst3705 2013-02-19-text-into-data
Mdst3705 2013-02-19-text-into-dataRafael Alvarado
 
Mdst3705 2013-02-12-finding-data
Mdst3705 2013-02-12-finding-dataMdst3705 2013-02-12-finding-data
Mdst3705 2013-02-12-finding-dataRafael Alvarado
 
Mdst3705 2013-02-05-databases
Mdst3705 2013-02-05-databasesMdst3705 2013-02-05-databases
Mdst3705 2013-02-05-databasesRafael Alvarado
 
Mdst3705 2013-01-29-praxis
Mdst3705 2013-01-29-praxisMdst3705 2013-01-29-praxis
Mdst3705 2013-01-29-praxisRafael Alvarado
 
Mdst3705 2013-01-31-php3
Mdst3705 2013-01-31-php3Mdst3705 2013-01-31-php3
Mdst3705 2013-01-31-php3Rafael Alvarado
 
Mdst3705 2012-01-22-code-as-language
Mdst3705 2012-01-22-code-as-languageMdst3705 2012-01-22-code-as-language
Mdst3705 2012-01-22-code-as-languageRafael Alvarado
 
Mdst3705 2013-01-24-php2
Mdst3705 2013-01-24-php2Mdst3705 2013-01-24-php2
Mdst3705 2013-01-24-php2Rafael Alvarado
 

Más de Rafael Alvarado (20)

Mdst3703 2013-10-08-thematic-research-collections
Mdst3703 2013-10-08-thematic-research-collectionsMdst3703 2013-10-08-thematic-research-collections
Mdst3703 2013-10-08-thematic-research-collections
 
Mdst3703 2013-10-01-hypertext-and-history
Mdst3703 2013-10-01-hypertext-and-historyMdst3703 2013-10-01-hypertext-and-history
Mdst3703 2013-10-01-hypertext-and-history
 
Mdst3703 2013-09-24-hypertext
Mdst3703 2013-09-24-hypertextMdst3703 2013-09-24-hypertext
Mdst3703 2013-09-24-hypertext
 
Presentation1
Presentation1Presentation1
Presentation1
 
Mdst3703 2013-09-12-semantic-html
Mdst3703 2013-09-12-semantic-htmlMdst3703 2013-09-12-semantic-html
Mdst3703 2013-09-12-semantic-html
 
Mdst3703 2013-09-17-text-models
Mdst3703 2013-09-17-text-modelsMdst3703 2013-09-17-text-models
Mdst3703 2013-09-17-text-models
 
Mdst3703 2013-09-10-textual-signals
Mdst3703 2013-09-10-textual-signalsMdst3703 2013-09-10-textual-signals
Mdst3703 2013-09-10-textual-signals
 
Mdst3703 2013-09-05-studio2
Mdst3703 2013-09-05-studio2Mdst3703 2013-09-05-studio2
Mdst3703 2013-09-05-studio2
 
Mdst3703 2013-09-03-plato2
Mdst3703 2013-09-03-plato2Mdst3703 2013-09-03-plato2
Mdst3703 2013-09-03-plato2
 
Mdst3703 2013-08-29-hello-world
Mdst3703 2013-08-29-hello-worldMdst3703 2013-08-29-hello-world
Mdst3703 2013-08-29-hello-world
 
UVA MDST 3703 2013 08-27 Introduction
UVA MDST 3703 2013 08-27 IntroductionUVA MDST 3703 2013 08-27 Introduction
UVA MDST 3703 2013 08-27 Introduction
 
MDST 3705 2012-03-05 Databases to Visualization
MDST 3705 2012-03-05 Databases to VisualizationMDST 3705 2012-03-05 Databases to Visualization
MDST 3705 2012-03-05 Databases to Visualization
 
Mdst3705 2013-02-26-db-as-genre
Mdst3705 2013-02-26-db-as-genreMdst3705 2013-02-26-db-as-genre
Mdst3705 2013-02-26-db-as-genre
 
Mdst3705 2013-02-19-text-into-data
Mdst3705 2013-02-19-text-into-dataMdst3705 2013-02-19-text-into-data
Mdst3705 2013-02-19-text-into-data
 
Mdst3705 2013-02-12-finding-data
Mdst3705 2013-02-12-finding-dataMdst3705 2013-02-12-finding-data
Mdst3705 2013-02-12-finding-data
 
Mdst3705 2013-02-05-databases
Mdst3705 2013-02-05-databasesMdst3705 2013-02-05-databases
Mdst3705 2013-02-05-databases
 
Mdst3705 2013-01-29-praxis
Mdst3705 2013-01-29-praxisMdst3705 2013-01-29-praxis
Mdst3705 2013-01-29-praxis
 
Mdst3705 2013-01-31-php3
Mdst3705 2013-01-31-php3Mdst3705 2013-01-31-php3
Mdst3705 2013-01-31-php3
 
Mdst3705 2012-01-22-code-as-language
Mdst3705 2012-01-22-code-as-languageMdst3705 2012-01-22-code-as-language
Mdst3705 2012-01-22-code-as-language
 
Mdst3705 2013-01-24-php2
Mdst3705 2013-01-24-php2Mdst3705 2013-01-24-php2
Mdst3705 2013-01-24-php2
 

Mdst 3559-02-01-html

  • 1. XHTML 2 MDST 3559: DataestheticsProf. Alvarado02/03/2011
  • 2. Business Regarding “Assignments” During the Basic Skills segment of the course, assignments will be given each Thursday to be due the following Monday Except for Week 7, where the assignment will be handed out on Tuesday and due Thursday
  • 3. Review Documents have three layers: content, structure, and layout. Structure consists of elementsand relationships Relationships can be trees or networks. Markup languages describe this structure for computational use XML is a general markup language or “metalanguage.” HTML is a specific markup language. designed for created networked hypermedia documents.
  • 4. How does HTML support trees? Networks?
  • 5. Trees as nested document elements, e.g. P, TABLE, ULNetworks as hypertext elements, e.g. A, IMG
  • 6. Overview Today we ... Continue with our learning of HTML Enhance jEdit with plugins Install an FTP client to upload images Create pages on STUDIO1 accounts Learn basic CSS
  • 7. jEdit Add plugins to your editor Go to “Plugins > Plugin Manager ...” to open dialog box. Select “Install” tab. Select the following: FTP InfoViewer PHPParser Sidekick XML XML Indenter CSS Editor Press the “Install” button.
  • 8. Testing jEdit Use jEdit to log in to your STUDIO1 account STUDIO1 is a server set up for this class Address: studio1.shanti.virginia.edu Do this: Go go “File > Open” (or press Ctrl-O or use icon) Select “Plugins > FTP > Secure FTP Server” as the very top Data to use Remote host: see above User name: your UVA user id Password: your blue unix password Leave the rest as is and press “OK” Click on the public_html and then “index.html”
  • 9. Install an test FTP client If you do not have one, use FileZilla See post on course site for URL Open FileZilla Go to “File > Site Manager” and select “New Site” Call the site “STUDIO1” Set the following: Host: studio1.shanti.virginia.edu (same as before) Servertype: SFTP Logontype: Normal User and password same as before
  • 10. FTP Client Inspect items on left and right windows These are the file systems on your laptop and the server Become familiar with this structure About the terms “client” and “server” Client refers to software on the client machine Server refers to software on the server machine Networked applications have client and server components WWW, MySQL, FTP, etc. “Remote” and “Local” are related terms
  • 11. About Addresses This FTP location ... sftp://studio1.shanti.virginia.edu /home/USERID/public_html ... maps onto this web location http://studio1.shanti.virginia.edu/~USERID Note: Different protocol prefixes: http vssftp Same machine addresses: studio1 ... Different paths (but which map): /~rca2t  /home/rca2t/public_html
  • 12. Exercise 1: Hello, World You already have an index page in your site. The URL for the page is: http://studio1.shanti.virginia.edu/~userid/ index.html is a the default page for your site; it does not need to be specified Convert this page into a standard HTML page with the following structure: html head title body h1 p Give it a title “Hello, World” and and use this as the H1 text
  • 13. Exercise 2: Add a link Create a new page. In jEdit, press Ctrl-N and then save the file as “page2.html” or something. Save the file – using Ctrl-S – noting that it allows you to save your new file in the remote directory. Create a link (aka anchor) from index.html to page2.html
  • 14. Exercise 3: Add an image Download an image from the internet Upload to your site using FTP In index.html, create an image element (IMG) and use the uploaded filename as the source (SRC) attribute Create a link from the image to the second page you created.
  • 15. Exercise 4: Create a table In your second page, add a table element and use it to organize two images A table has the following structure: <table> <tr> <td>STUFF GOES HERE</td> <td>STUFF GOES HERE</td> </tr> </table>
  • 17. CSS “Cascading Style Sheets” Allows you to add styles to HTML Each level has its language ... Styles include: Font characteristics Line characteristics Text block Background colors and images Etc.
  • 18. <html> <head> <title>I’m an HTML document</title> </head> <body> <h1>Here is the first header</h1> <p>Here is some conent</p> </body> </html> Standard HTML Doc
  • 19. <html> <head> <title>I’m an HTML document</title> </head> <body> <h1>Here is the first header</h1> <p>Here is some content:</p> <h1> <p>Some Text I want to emphasize.</p> </h1> </body> </html> What not to do!
  • 20. <html> <head> <title>I’m an HTML document</title> </head> <body> <h1>Here is the first header</h1> <p>Here is some conent</p> <div style=“font-size:14pt;"> <p>Some Text I want to emphasize.</p> </div> </body> </html> Instead, use CSS
  • 21. <html> <head> <title>I’m an HTML document</title> <style type="text/css"> div { font-size:14pt; font-weight:bold; } </style> </head> <body> <h1>Here is the first header</h1> <p>Here is some conent</p> <div> <p>Some Text I want to emphasize.</p> </div> </body> </html> Better yet, put CSS here
  • 22. <html> <head> <title>I’m an HTML document</title> <style type="text/css"> .foo { font-size:14pt; font-weight:bold; } </style> </head> <body> <h1>Here is the first header</h1> <p>Here is some conent</p> <div class=“foo”> <p>Some Text I want to emphasize.</p> </div> </body> </html> with CSS in header using class attribute
  • 23. <html> <head> <title>I’m an HTML document</title> <link rel=“stylesheet” type=“text/css” href=“default.css” /> </head> <body> <h1>Here is the first header</h1> <p>Here is some conent</p> <div> <p>Some Text I want to emphasize.</p> </div> </body> </html> Even better: CSS in linked file
  • 24. default.css .foo { font-size:14pt; font-weight:bold; } This is what the content of the default.css file would look like.
  • 25. CSS Syntax: Selectors .foo { font-size:14pt; font-weight:bold; } The “selector” indicates what elements the styles apply to. Can address element names, classes, and ID.
  • 26. CSS Syntax: Selectors #foo { font-size:14pt; font-weight:bold; } Here the selector finds an element with an ID attribute with the value “foo” … e.g. <div id=“foo”>Hey.</div>
  • 27. Example selectors p Any p element p.foo Any p element with a class of foo .foo Any element with a class of foo #foo The element with an id of foo
  • 28. CSS Syntax: Declarations .foo { font-size:14pt; font-weight:bold; } The “declarations” specify properties and values to apply to the element. Form =property-name: value;
  • 29. Example Directives font-family: Georgia, Garamond, serif; color: blue; color: #eeff99; background-color: gray; border: 1px solid black; padding: 5px; margin: 5px;
  • 30. Basic Idea A CSS file is just a series of “rules” A CSS rule has two parts A selector to identify elements (tag name, class, id) One or more declarations of style CSS rules have a simple syntax Selectors followed by curly braces Key/value pairs separated by colons Rules separated by semi-colons
  • 31. Basic idea You can apply any number of rules to a document Rules may appear in attributes, headers, or external files Rules are “cascaded” Later ones inherit previous ones Later ones have precedence (can overwrite) earlier ones
  • 32. Exercise 4: Adding Style Create a style element in the head of your first page <style type=“text/css”> body { ... } </style> Change the background color of your page Use the CSS list in today’s materials Change the font of your header
  • 33. Exercise 5: Create a separate stylesheet Create a new page in jEdit called “default.css” Cut and paste the contents of your STYLE element into your new css file Create a LINK element in the HEAD of each document and link to this stylesheet <link rel=“stylesheet” type=“text/css” href=“default.css” /> Remove the STYLE elements from the HEAD of your page
  • 34. Assignment (to be posted) Create a page collection in your STUDIO1 directory with the following items: Main page  main1.html Topic page 1  main1-topic1.html Topic page 2  main1-topic2.html For each page, create a TITLE element and an H1 element, titling each page as your wish. In Topic page 1 Embed two visualizations Write 250 words of context In Topic page 2 Create a gallery of 4 images using a 2 x 2 tables Create a common style sheet for each page and define font and color styles for the following elements: BODY, H1, and P Create a common menu in each page that links to the other pages