xml html css structure and form

Similar documents
store process communicate

ICT IGCSE Practical Revision Presentation Web Authoring

Lab Introduction to Cascading Style Sheets

CSS.

2. Write style rules for how you d like certain elements to look.

Introduction to WEB PROGRAMMING

ICT IGCSE Practical Revision Presentation Web Authoring

Html basics Course Outline

HTML Summary. All of the following are containers. Structure. Italics Bold. Line Break. Horizontal Rule. Non-break (hard) space.

<body bgcolor=" " fgcolor=" " link=" " vlink=" " alink=" "> These body attributes have now been deprecated, and should not be used in XHTML.

Cascading style sheets, HTML, DOM and Javascript

CSS 1: Introduction. Chapter 3

HTML and CSS COURSE SYLLABUS

HTML & CSS. SWE 432, Fall 2017 Design and Implementation of Software for the Web

HTMLnotesS15.notebook. January 25, 2015

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1

Welcome Please sit on alternating rows. powered by lucid & no.dots.nl/student

HTML + CSS. ScottyLabs WDW. Overview HTML Tags CSS Properties Resources

Chapter 3 Style Sheets: CSS

Block & Inline Elements

COMS 359: Interactive Media

Cascading Style Sheets Level 2

HTML & CSS. Lesson 1: HTML Basics Lesson 2: Adding Tables Lesson 3: Intro to CSS Lesson 4: CSS in more detail Lesson 5: Review

Study Guide 2 - HTML and CSS - Chap. 6,8,10,11,12 Name - Alexia Bernardo

CSS: The Basics CISC 282 September 20, 2014

Session 4. Style Sheets (CSS) Reading & References. A reference containing tables of CSS properties

3.1 Introduction. 3.2 Levels of Style Sheets. - The CSS1 specification was developed in There are three levels of style sheets

- The CSS1 specification was developed in CSS2 was released in CSS2.1 reflects browser implementations

LING 408/508: Computational Techniques for Linguists. Lecture 14

Introduction to Multimedia. MMP100 Spring 2016 thiserichagan.com/mmp100

The Benefits of CSS. Less work: Change look of the whole site with one edit

Styles, Style Sheets, the Box Model and Liquid Layout

ADDING CSS TO YOUR HTML DOCUMENT. A FEW CSS VALUES (colour, size and the box model)

In the early days of the Web, designers just had the original 91 HTML tags to work with.

Data Visualization (DSC 530/CIS )

CSC309 Tutorial CSS & XHTML

Introduction to Web Tech and Programming

APPLIED COMPUTING 1P01 Fluency with Technology

Chapter 1 Getting Started with HTML 5 1. Chapter 2 Introduction to New Elements in HTML 5 21

CSS مفاهیم ساختار و اصول استفاده و به کارگیری

Wanted! Introduction. Step 1: Styling your poster. Activity Checklist. In this project, you ll learn how to make your own poster.

CS 350 Internet Applications I Name: Exam II (CSS) October 29, 2013

Part 3: Images & form styling NOMZAMO S WEBSITE

Assignments (4) Assessment as per Schedule (2)

Session 3.1 Objectives Review the history and concepts of CSS Explore inline styles, embedded styles, and external style sheets Understand style

CSS: Cascading Style Sheets

CSS Cascading Style Sheets

c122jan2714.notebook January 27, 2014

Lab 4 CSS CISC1600, Spring 2012

Web Design and Development ACS Chapter 12. Using Tables 11/23/2017 1

CSC 121 Computers and Scientific Thinking

How to lay out a web page with CSS

**Method 3** By attaching a style sheet to your web page, and then placing all your styles in that new style sheet.

CSCB20 Week 7. Introduction to Database and Web Application Programming. Anna Bretscher Winter 2017

Page Layout Using Tables

CS 350 COMPUTER/HUMAN INTERACTION. Lecture 6

Title: Jan 29 11:03 AM (1 of 23) Note that I have now added color and some alignment to the middle and to the right on this example.

Text and Layout. Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 11. This presentation 2004, MacAvon Media Productions

INTRODUCTION TO CSS. Mohammad Jawad Kadhim

3.1 Introduction. 3.2 Levels of Style Sheets. - HTML is primarily concerned with content, rather than style. - There are three levels of style sheets

Web Design 101. What is HTML? HTML Tags. Web Browsers. <!DOCTYPE html> <html> <body> <h1>my First Heading</h1> <p>my first paragraph.

A Balanced Introduction to Computer Science, 3/E

VISA/APCO/STAC 2P61 WEBSITE CREATION Fall Term 2012

Appendix D CSS Properties and Values

recall: a Web page is a text document that contains additional formatting information in the HyperText Markup Language (HTML)

Before you begin, make sure you have the images for these exercises saved in the location where you intend to create the Nuklear Family Website.

FUNDAMENTALS OF WEB DESIGN (405)

Module 2 (VII): CSS [Part 4]

Let s start with the document tree

HTML5: Adding Style. Styling Differences. HTML5: Adding Style Nancy Gill

Reading 2.2 Cascading Style Sheets

Unveiling the Basics of CSS and how it relates to the DataFlex Web Framework

First Name Last Name CS-081 March 23, 2010 Midterm Exam

Adding CSS to your HTML

Cascading Style Sheets (CSS)

Index. alt, 38, 57 class, 86, 88, 101, 107 href, 24, 51, 57 id, 86 88, 98 overview, 37. src, 37, 57. backend, WordPress, 146, 148

SEEM4570 System Design and Implementation. Lecture 1 Cordova + HTML + CSS

Style Sheet A. Bellaachia Page: 22

- HTML is primarily concerned with content, rather than style. - However, tags have presentation properties, for which browsers have default values

CSS means Cascading Style Sheets. It is used to style HTML documents.

The internet is a worldwide collection of networks that link millions of computers. These links allow the computers to share and send data.

HTML & CSS. Rupayan Neogy

epromo Guidelines DUE DATES NOT ALLOWED PLAIN TEXT VERSION

5 Snowdonia. 94 Web Applications with C#.ASP

CSS. Shan-Hung Wu CS, NTHU

Using Dreamweaver CS6

HTML and CSS: An Introduction

COSC 2206 Internet Tools. CSS Cascading Style Sheets

Graded Project. HTML Coding

Title: Dec 11 3:40 PM (1 of 11)

singly and doubly linked lists, one- and two-ended arrays, and circular arrays.

Overview. Part I: Portraying the Internet as a collection of online information systems HTML/XHTML & CSS

To link to an external stylesheet, the link element is placed within the head of the html page:

1 Creating a simple HTML page

CSS stands for Cascading Style Sheets Styles define how to display HTML elements

[AVWSQ-ADWCS6]: WSQ ICDL Adobe Dreamweaver CS6

ITSE 1401 Web Design Tools Lab Project 4 (Expression Web 4 - Units M, N, O, P) Last revised: 1/9/14

1/6/ :28 AM Approved New Course (First Version) CS 50A Course Outline as of Fall 2014

Hyper Text Markup Language HTML: A Tutorial

Taking Fireworks Template and Applying it to Dreamweaver

Transcription:

CSS (cascading style sheets) is another language for describing the style used to present a document. xml html css structure and form xml for communicating structured data general language for labelled trees html an xml format for text markup css a stylesheet language for presenting html Computers use a variety of languages or protocols for communication. We also use languages for communicating with computers. XML is a general language for describing labelled trees. HTML (hyper text markup language) is a language for describing structured documents a special version of XML used for describing web pages.

<?xml version="1.0" encoding="utf-8"?> <collection> <recipe> <title>spaghetti with meatballs</title> <description> A classic vegetarian dish. </description> <ingredient>spaghetti <grams>600</grams><ounces>21</ounces> </ingredient> <ingredient>minced beef <grams>250</grams><ounces>8.75</ounces> </ingredient> <ingredient>egg<number>1</number></ingredient> <method> <step> In a large bowl, mix the minced beef, egg and parsley together. Season to taste. </step> <step> Now take a teaspoon of mixture and, in your hand, roll it into a ball. Dust the ball in flour and put to one side. Repeat with the rest of the mixture. </step> </method> <time> <prep>less than 30 mins</prep> <cook>10 to 30 mins</cook> </time> <servings>4</servings> <image> <file>1.jpg</file><title>beef Mince</title> </image> <by>gino D Acampo</by> <from>saturday Kitchen</from> </recipe> </collection> http://www.bbc.co.uk/food/recipes/database/spaghettiwithmeatbal_72227.shtml We represent the information in the recipe using XML The first line is just housekeeping it says that we are using a particular version of xml and also specifies how the characters in this file are encoded as bits and bytes (we will talk more about utf-8 later). Here, we don t use html tags - we just make up tags that make sense to us to describe the structure of the recipe. XML is flexible markup language. You can use any set of tags that you want. You just need to match opening and closing tags.

/ <collection> <recipe> <recipe> <recipe> <recipe> <recipe> <recipe> <recipe> <title> <description> <servings> <time> <prep> <cook> <image> <file> <title> <by> <from> <method> <step> <step> <ingredient> <step> <ingredient> <ingredient> <ingredient> <ingredient> <ingredient> <step> <grams> <ounces> <number> XML organises information in labelled trees. We draw them upside-down. We will markup text with these structures using xml and html, control the appearance of web pages using css Normally web pages are written in html, which uses a standard set of tags that browsers understand. However, we can also write stylesheets for xml that tell the browser how to present tags that we have invented to describe the structure we are interested in.

When we talk about trees, we often use the language of family trees parent, children, sibling, descendant, ancestor.

<world> <europe> <fr> </fr> <de> </de> <uk> <eng> </eng> <ni> </ni> <scot> </scot> <wales> </wales> </uk> </europe> </world> nested hierarchy xml can be used to represent any nested hierarchy. The various social and political divisions form a nested hierarchy.

html5 html <!DOCTYPE html> <html lang="en"> <head> <title>swapping Songs</title> </head> <body> <h1>swapping Songs</h1> <p>tonight I swapped some of the songs I wrote with some friends, who gave me some of the songs they wrote. I love sharing my music.</p> </body> </html> head title body h1 p Here is an html example (shown rendered as a web page below). We can represent the structured hierarchy of the web page by a map. Note that the circles do not overlap that s what we mean by a nested hierarchy. The same structure is represented by the html tags being properly nested. It is easier to see whether your xml is properly nested is you use indentation to keep track of the depth of each tag in the tree.

a section <section> content </section> headings h1 - h2 - - h6 <h1> content </h1> an address <address> streetaddress </address> paragraph <p> content </p> blockquote <blockquote> content </blockquote> some html5 tags <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html> <html> <head> <title> content </title> </head> <body> content </body> </html> an image <img src ="URL" alt="title"/> line break <br /> html uses a special vocabulary of tags Here are some common html tags. For this course, we will be using xml with the html5 dialect for our web pages. The second line is more housekeeping. The first line is optional for browsing (but needed if we want to use xml tools).

css cascading style sheets body{ background-color:#d0e4fe; } h1{ } p{ } color:orange; text-align:center; font-family:"times New Roman"; font-size:20px; css is a stylesheet language for describing the presentation of an html file

<!DOCTYPE html> <html lang="en"> <head> <title>swapping Songs</title> <style type="text/css"> body{ background-color:#d0e4fe; } h1{ color:orange; text-align:center; } p{ font-family:"times New Roman"; font-size:20px; } </style> </head> <body> <h1>swapping Songs</h1> <p>tonight I swapped some of the songs I wrote with some friends, who gave me some of the songs they wrote.</p> <h2>how I feel</h2> <p>i love sharing my music.</p> <h3>the end</h3> </body> </html> html5 + css We can add a <style> node to our html tree to specify the presentation of our page. Colours (always spelled color in css) can be given by name or by number (more about the numbers later). Size here is given in pixels (px) but it can also be given in points (pt), or centimetres (cm). Except for zero lengths, every length needs a unit.

body { margin: 20px; padding: 10px; font-family: Helvetica, Arial, sans-serif; border-style: solid; background-color:#d0e4fe; } p { border-style:dotted; border-width:1px; } h1{ color:orange; } h2 { font-size: 28px; line-height: 44px; padding: 22px; } h3 { font-size: 18px; line-height: 22px; padding: 11px ; } css padding border margin The layout of a web page uses a box model: each node occupies a box around which we can add any or all of padding, a border, and a margin.

tables <table> <caption>some cookery books</caption> <thead> <tr> <th>isbn</th> <th>title</th> <th>author</th> <th>pubid</th> <th>pages</th> </tr> </thead> <tr> <td>029785593x</td> <td>from Nature To Plate </td> <td>tom Kitchin</td> <td>7642</td> <td>272</td> </tr> <tr> <td>955904609</td><td> Cookbook</td> <td> Martin Wishart </td><td>3556</td><td>256</td> </tr> <tr class="centre"> <td></td><td></td> <td></td><td></td> <td></td> </tr> </table> Tables are a common way of presenting information. HTML markup for tables makes rows more important than columns.

Here is an example http://www.weightlossforall.com/

and another

information is structured data 0110011011110110 0100111011001101 1011101011011001 0010101100110111 0110011011110110 0100111011001101 1011101011011001 0010101100110111 father mother birthdate location Information is stored as bits, but we normally think about how it is organised at a higher level. The organisation of data is one way of representing knowledge.

Relational Data A table of data. Each entry in a cell is a datum Books isbn title author pubid pages 029785593X From Nature To Plate Tom Kitchin 7642 272 955904609 Cookbook Martin Wishart 3556 256 When we think of tables as a way of organising data then rows and colums are equally important but different.

Relational Data Rows represent the things we re interested in. Books We call each row a record. isbn title author pubid pages 029785593X From Nature To Plate Tom Kitchin 7642 272 955904609 Cookbook Martin Wishart 3556 256 A table of similar records is called a relation. Each row, or record, represents an item (in this example, a book).

Relational Data Columns represent properties or attributes. Books Each of these is a field. isbn title author pubid pages 029785593X From Nature To Plate Tom Kitchin 7642 272 955904609 Cookbook Martin Wishart 3556 256 Each record in the relation has the same format. Each column represents a property of the item, or field. We have the same fields (the same information) for every item.

Publishers Relational data ID name address 7,642 3,556 Weidenfeld & Nicolson Mr Max Publishing London Edinburgh A typical database has many relations. An ID or key field uniquely identifies a record. Some fields have the special property that the value in that field uniquely identifies the item. We call this a key. The isbn field is a key for the Books table The ID field is a key for the Publishers table We can use a key field to let one table refer to (index into) another table.

Books Publishers Relational data ID name address 7,642 3,556 Weidenfeld & Nicolson Mr Max Publishing London Edinburgh isbn title author pubid pages 029785593X From Nature To Plate Tom Kitchin 7642 272 955904609 Cookbook Martin Wishart 3556 256 A typical database has many relations. An ID or key field uniquely identifies a record. Some fields have the special property that the value in that field uniquely identifies the item. We call this a key. The isbn field is a key for the Books table The ID field is a key for the Publishers table We can use a key field to let one table refer to (index into) another table.

Relational data field a property or attribute record values for each field, for a given item relation or table set of records, representing a set of items key a field that uniquely identifies an item Check that you understand the terminology.

Relational data field a property or attribute record values for each field, for a given item relation or table set of records, representing a set of items key a field that uniquely identifies an item Check that you understand the terminology.

Relational data field a property or attribute record values for each field, for a given item relation or table set of records, representing a set of items key a field that uniquely identifies an item Check that you understand the terminology.

Relational data field a property or attribute record values for each field, for a given item relation or table set of records, representing a set of items key a field that uniquely identifies an item Check that you understand the terminology.

Relational data field a property or attribute record values for each field, for a given item relation or table set of records, representing a set of items key a field that uniquely identifies an item Check that you understand the terminology.

We can use this to turn semantic xml into html, or to extract data from an xml or html page http://nwalsh.com/docs/tutorials/xsl/xsl/slides.html We started with a semantic view of a recipe, but then turned to html, then tables. Different ways of presenting information. One of the things we ll do is to transform information from one representation into another. For example, XSL lets us construct new trees out of old trees. The basic idea is that we use xsl to extract parts of a tree and build a new tree.