Motivation (WWW) Markup Languages (defined). 7/15/2012. CISC1600-SummerII2012-Raphael-lec2 1. Agenda

Similar documents
Bridges To Computing

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0

Module 2 (III): XHTML

XHTML. XHTML stands for EXtensible HyperText Markup Language. XHTML is the next generation of HTML. XHTML is almost identical to HTML 4.

Html basics Course Outline

INTRODUCTION TO WEB USING HTML What is HTML?

CSI 3140 WWW Structures, Techniques and Standards. Markup Languages: XHTML 1.0

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

introduction to XHTML

HTML. Mohammed Alhessi M.Sc. Geomatics Engineering. Internet GIS Technologies كلية اآلداب - قسم الجغرافيا نظم المعلومات الجغرافية

Creating A Web Page. Computer Concepts I and II. Sue Norris

XHTML & CSS CASCADING STYLE SHEETS

Programmazione Web a.a. 2017/2018 HTML5

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

c122jan2714.notebook January 27, 2014

Chapter 2:- Introduction to XHTML. Compiled By:- Sanjay Patel Assistant Professor, SVBIT.

As we design and build out our HTML pages, there are some basics that we may follow for each page, site, and application.

HTML. Hypertext Markup Language. Code used to create web pages

Basic HTML Lecture 14

Basic HTML. Lecture 14. Robb T. Koether. Hampden-Sydney College. Wed, Feb 20, 2013

Basic HTML. Lecture 14. Robb T. Koether. Hampden-Sydney College. Wed, Feb 20, 2013

HTML & XHTML Tag Quick Reference

CMPT 165 Unit 2 Markup Part 2

Introduction to HTML

Introduction to Computer Science (I1100) Internet. Chapter 7

11. HTML5 and Future Web Application

Announcements. Paper due this Wednesday

Introduction to Computer Science (I1100) Internet. Chapter 7

HTML Overview formerly a Quick Review

1. The basic building block of an HTML document is called a(n) a. tag. b. element. c. attribute. d. container. Answer: b Page 5

HTML. Based mostly on

COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2018)

FUNDAMENTALS OF WEB DESIGN (46)

Understanding the Web Design Environment. Principles of Web Design, Third Edition

HYPERTEXT MARKUP LANGUAGE ( HTML )

Scientific Communication CITS4008. Designing and Writing Web Pages Rachel Cardell-Oliver 2013 Based on notes by Robyn Owens

Web Development & Design Foundations with XHTML. Chapter 2 Key Concepts

What is XHTML? XHTML is the language used to create and organize a web page:

HTML is a mark-up language, in that it specifies the roles the different parts of the document are to play.

Chapter 10: Understanding the Standards

HTML Overview. With an emphasis on XHTML

1. Please, please, please look at the style sheets job aid that I sent to you some time ago in conjunction with this document.

What is a web site? Web editors Introduction to HTML (Hyper Text Markup Language)

HTML and CSS COURSE SYLLABUS

Scripting for Multimedia LECTURE 1: INTRODUCING HTML5

Internet publishing HTML (XHTML) language. Petr Zámostný room: A-72a phone.:

Comp-206 : Introduction to Software Systems Lecture 22. Alexandre Denault Computer Science McGill University Fall 2006

Certified HTML5 Developer VS-1029

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

By Ryan Stevenson. Guidebook #2 HTML

HTML HTML/XHTML HTML / XHTML HTML HTML: XHTML: (extensible HTML) Loose syntax Few syntactic rules: not enforced by HTML processors.

CSC309 Tutorial CSS & XHTML

Chapter 4. Introduction to XHTML: Part 1

Web Development IB PRECISION EXAMS

Intro to html. --- define every element, attribute, and entity along with the rules for their use

Introduction to Web Development

Web Design and Development ACS Chapter 3. Document Setup

Introduction to web development and HTML MGMT 230 LAB

(1) I (2) S (3) P allow subscribers to connect to the (4) often provide basic services such as (5) (6)

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

MODULE 2 HTML 5 FUNDAMENTALS. HyperText. > Douglas Engelbart ( )

HTML BEGINNING TAGS. HTML Structure <html> <head> <title> </title> </head> <body> Web page content </body> </html>

Review of HTML. Chapter Pearson. Fundamentals of Web Development. Randy Connolly and Ricardo Hoar

COMSC-030 Web Site Development- Part 1. Part-Time Instructor: Joenil Mistal

Hyper Text Markup Language HTML: A Tutorial

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

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

GRAPHIC WEB DESIGNER PROGRAM

Certified HTML Designer VS-1027

Web Publishing with HTML

HTML CS 4640 Programming Languages for Web Applications

Structured documents

ATSC 212 html Day 1 Web Authoring

A HTML document has two sections 1) HEAD section and 2) BODY section A HTML file is saved with.html or.htm extension

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

Introduction to Web Technologies

Tutorial 1 Getting Started with HTML5. HTML, CSS, and Dynamic HTML 5 TH EDITION

A Brief Introduction to HTML

Web Programming HTML CSS JavaScript Step by step Exercises Hans-Petter Halvorsen

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM Advanced Internet Technology Lab.

CSC 121 Computers and Scientific Thinking

HTML TAG SUMMARY HTML REFERENCE 18 TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES MOST TAGS

Semantic Web Lecture Part 1. Prof. Do van Thanh

HTTP & Websites. Web Browsers. Web Servers vs. Web sites. World Wide Web. Internet Explorer. Surfing the World Wide Web. Part 4. The World Wide Web

Web Engineering (Lecture 01)

History of the Internet. The Internet - A Huge Virtual Network. Global Information Infrastructure. Client Server Network Connectivity

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

COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2017)

Chapter 1 Introduction to Dreamweaver CS3 1. About Dreamweaver CS3 Interface...4. Creating New Webpages...10

CREATING A WEBSITE USING CSS. Mrs. Procopio CTEC6 MYP1

Advanced Web Programming C2. Basic Web Technologies

Introduction to WEB PROGRAMMING

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

Unit 5 Web Publishing Systems Page 1 of 13 Part 4 HTML Part 4

HTML HTML. Chris Seddon CRS Enterprises Ltd 1

XML for Java Developers G Session 2 - Sub-Topic 1 Beginning XML. Dr. Jean-Claude Franchitti

It is possible to create webpages without knowing anything about the HTML source behind the page.

A Balanced Introduction to Computer Science, 3/E

Chapter 2 Creating and Editing a Web Page

Exam : 9A Title : Adobe GoLive CS2 ACE Exam. Version : DEMO

Transcription:

CISC 1600 Introduction to Multi-media Computing Agenda Email Address: Course Page: Class Hours: Summer Session II 2012 Instructor : J. Raphael raphael@sci.brooklyn.cuny.edu http://www.sci.brooklyn.cuny.edu/~raphael/cisc1600.html MTWTH 11:50 1:35PM 5301N Markup Languages XHTML Tags Markup Languages (defined). Markup languages are not the same as programming languages. Programming languages are used to create programs that control the behavior of a machine. C/++/#, Java, Processing, PHP, Perl, Haskel, Prolog Markup languages are used for adding information (sometimes called metadata) to text in a way which is distinguishable from that text. GenCode, LaTeX, SGML, XML, HTML, XHTML It is possible to embed programming language statements/commands into a markup language. Motivation (WWW) It is possible to send pictures over the Internet, but pictures are large (slow to transfer), fixed (difficult to rearrange) and difficult to resize (interpolation, aliasing). It's very cheap and easy to send plain text over the Internet (ASCI, Unicode, UTF-8, UTF-16 and UTF-32). However plain text is difficult to read. Markup languages allow us to add information to text, in a manner that is distinguishable from the text. Markup languages can be used to enhance the comprehension/understandability of the text. 1

Text vs. Images Plain Text (difficult to read) This very simple webpage illustrates why we use markup languages. COURSE DESCRIPTION. This course will commence with a broad introduction to topics in Multi-Media Computing (MMC), including: web design, game design, animation, data visualization, simulation and robotics. Discussions will be introductory and will cover a broad range of subjects, such as: multimedia hardware and software, including game boxes; human interface design and input using multi-media devices; graphical and other forms of output to multi-media devices; computer-based sound editing; agent-based programming for simulations and robotics; and uses of multi-media in industry. Emphasis is on the design and creation of a range of artifacts, including: web pages, with HTML and cascading style sheets; interactive, graphical web-based programs; and simple computer games and narratives. The format consists of alternative lecture/laboratory class sessions, with strong emphasis on hands-on learning. The following topics will be covered in 4 curricular units:introduction to web programming and web design.(princples of Web Design; XTHML; Cascading Style Sheets (CSS); GIMP; Audacity); Interactive web programming and data visualization; (Processing; Many Eyes; JavaScript; Server Side Scripting Languages); Game Programming and Visual Narratives; (Scratch; FLash CS4; Mobile Device Programming); Agent-based programming, simulations, multimedia devices; (NetLogo; PD). Text augmented with presentation markup (easier to understand). Types of Markup 1. Presentational markup: Used by traditional wordprocessing systems, to create a WYSIWYG effect. Examples: add line break, bold word, change font style or color. 2. Procedural markup: Provides instructions for programs that are to process the text. Examples: add an image, applet or link to a document. 3. Semantic markup: Used to label parts of document and attach additional meaning to those sections. Examples: define the title of a document or declaring that a section of text is an address. 2

Markup Languages - Key Terminology Tag: A markup construct that begins with "<" and ends with ">". Tags come in three flavors: start-tags, for example <p>, end-tags, for example </p>, and empty-element tags, for example <br/>. Element: A component that begins with a start-tag and ends with a matching end-tag, or consists only of an empty-element tag. The characters between the start- and end-tags, if any, are the element's content, and may contain include other elements, which are called child elements. An example of an element is <p>hello, world.</p>. Another is <br/> Attribute: A construct consisting of a name/value pair that exists within a start-tag or empty-element tag. In the example (below) the element img has two attributes, src and alt: <img src="button.jpg" alt='button'/>. Intro to XHTML 1. XHTML is an extension of HTML and stands for extensible Hyper-Text Mark-up Language. 2. XHTML is a language web servers can use to communicate with computers via web browsers. 3. XHTML content is delivered in pages, consisting of plain text interspersed with tags. 4. Web pages are stored as files on computers called servers, because they serve (i.e., deliver) the content to the computers that want to look at it. 5. Web content pages, documents, are stored in files with names ending in:.html or.htm HTML vs. XHTML XHTML is almost identical to HTML 4.01 XHTML is a stricter and cleaner version of HTML Many pages on the internet contain "bad" HTML. Browsers are still expected to interpret this "bad" HTML correctly (mobile devices). XHTML is HTML defined as an XML application This allows you to create and define your own tags. XHTML is a W3C Recommendation and is designed to completely replace HTML 4. NOTE: HTML 5 is NOT a W3C recommendation, and no browser has FULL HTML 5 support... yet. XHTML Rules (1) The Most Important Differences ARE: (all examples are WRONG) 1. XHTML elements must be properly nested EX: <b><i>this text is bold and italic</b></i> 2. XHTML elements must always be closed EX: <p>this is a paragraph 3. XHTML elements must be in lowercase EX: <P>This is a paragraph</p> 4. XHTML documents must have one root element EX: <html> <head>... </head> </html> <html> <body>... </body> </html> 3

XHTML Rules (2) Some More XHTML Syntax Rules (all examples are CORRECT) 5. Attribute names must be in lower case Ex: <table width="100%"> 6. Attribute values must be quoted Ex: <table width="100%"> 7. Attribute minimization is forbidden Ex: <frame noresize="noresize" /> 8. The id attribute replaces the name attribute 9. XHTML has predefined mandatory elements Minimum Components of a "Transitional" XML document <!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> <head> <title>simple document</title> </head> <body> some content </body> Document Type Definitions (DTD) [XML-Schema] A DTD specifies the syntax of a web page in SGML. DTDs are used by SGML applications, such as HTML, to specify rules for documents of a particular type, including a set of elements and entity declarations. An XHTML DTD describes the precise, allowed syntax of XHTML markup There are three XHTML DTDs: TRANSITIONAL STRICT FRAMESET XML Documents Can Be "Validated" You can check your.html documents to see if the are "valid" by going to the following link: http://validator.w3.org/ If your xhtml file violates any rules or is missing any required elements it will generate errors. The "minimal transitional document" from the previous slide is free from errors (although it generates "warnings"). XHTML pages (and websites) that are "valid" can then add the following picture: 4

Writing XHTML Many applications can be used to create XHTML documents. No matter what you use, the basic underlying XHTML is the same. For this class, you will use a text editor to write basic XHTML: on a PC, this is Notepad (not Wordpad) or Notepad++ on a Mac, this is TextEdit (in plain text mode, not rtf) on Linux/Unix, this can be pico or emacs or vi or Text Editor. For this class, you will create a file using a text editor and type content and XHTML tags into that file. Follow the lab sheet for detailed instructions! In the remainder of these notes, you will find a quick reference to basic XHTML tags. opening tag: <html> closing tag: </html> header: <head>... </head> body: <body>... </body> title (goes inside the header): Page Tags <title>my first HTML document</title> this text appears as the title of the browser window Page Tags Paragraph Tags heading <h1>an important heading</h1> <h2>a slightly less important heading</h2> there are other sizes, from <h1> (largest) to <h7> (smallest) note the difference between header and heading: header appears at the top of the page, between <head>... </head> tags whereas headings appear in the content of a page paragraphs: <p>this is the first paragraph.</p> <p>this is the second paragraph.</p> line breaks: This is the first line.<br> This is the second line. 5

Character Tags Font Tags emphasis: This is a really <em>interesting</em> topic! italics: This is a really <i>interesting</i> topic! bold: This is a <b>boldly interesting</b> topic! preformatted text: <pre> hello world hello again </pre> font size: <big>this text is very big</big> <small>this text is very small</small> another way to set font size: <font size="1">this text is in font size 1 (smallest)</font> <font size="7">this text is in font size 7 (largest)</font> font face: <font face="courier">this text is in courier font face</font> font color: <font color="red">this text is red</font> Links Lists A link is a tag that directs your browser to another page if the user clicks on the link the content of the link tag consists of: 1. the URL where you want the browser to go if the user clicks on the link 2. the text that you want the user to see (i.e., the text that the user will click on to activate the link) example: This a link to <a href="http://www.google.com">google</a>. This a link to <a href="http://www.google.com" target =_blank> google </a> that opens up another window. Un-ordered list: <ul> <li>the first list item</li> <li>the second list item</li> <li>the third list item</li> </ul> Ordered list: <ol> <li>the first list item</li> <li>the second list item</li> <li>the third list item</li> </ol> 6

Nested Lists Tables Lists can be nested, which means you can put one list inside another list: this is my shopping list: <ul> <li>bread</li> <li>apples</li> <li>ice cream</li> <ul> <li>vanilla</li> <li>chocolate</li> <li>mango</li> </ul> <li>peanut butter</li> </ul> begin a table with <table> end a table with </table> begin each row with <tr> and end each row with </tr> begin each column with <td> and end each column with </td> options: borders cellpadding (padding within a cell) cellspacing (spacing between cells) width and height (in pixels) tricks: empty cells --- use spanning multiple rows or columns coloring cells: <td bgcolor="red">asdf</td> aligning cell content: horizontally: left, center, right vertically: top, middle, bottom Tables Continued advanced formatting: Tables Continued cell padding (extra space inside the cells) cell spacing (space between the cells) width of table, of cells alignment of cell content empty cells ( ) multi-row and multi-column cells borders coloring cells headings 7

Tables Continued <table> <tr> <td>name</td> <td>score</td></tr> <tr><td>apple</td><td>9</td></tr> <tr><td>bob</td><td>12</td></tr> <tr><td>carl</td><td>3</td></tr> </table> 8