XHTML and CSS Web Applications. Using HTML/XHTML XHTML is relatively simple. You do most of your work with about twenty tags. XHTML is orderly and structured.

Slides:



Advertisements
Similar presentations
XHTML Week Two Web Design. 2 What is XHTML? XHTML is the current standard for HTML Newest generation of HTML (post-HTML 4) but has many new features which.
Advertisements

CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Cascading Style Sheets
Today CSS HTML A project.
Chapter 3 – Designing your web pages Dr. Stephanos Mavromoustakos.
1. Content – Collective term for all text, images, videos, etc. that you want to deliver to your audience. 2. Structure – How the content is placed on.
Cascading Style Sheets. CSS stands for Cascading Style Sheets and is a simple styling language which allows attaching style to HTML elements. CSS is a.
Web Development & Design Foundations with XHTML Chapter 7 Key Concepts.
Recognizing the Benefits of Using CSS 1. The Evolution of CSS CSS was developed to standardize display information CSS was slow to be supported by browsers.
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 3: XHTML Coding © 2007 Prosoft Learning Corporation All rights reserved ITD 110 Web Page.
Site Development Foundations © 2004 ProsoftTraining All rights reserved.
Instructional Technology & Design Office or Insert Workshop Name Presented by Your Name Here.
XHTML II DIGITAL MEDIA: COMMUNICATION AND DESIGN F2007.
XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
More HTML Chapter 4. 2 Nesting Tags How do you write the following in HTML? The wrong way: This is really, REALLY fun ! Tags must be correctly nested.
Working with Cascading Style Sheets. 2 Objectives Introducing Cascading Style Sheets Using Inline Styles Using Embedded Styles Using an External Style.
HTML, XHTML, CSS, & JAVAScript ~ an introduction ~
TECH2018 Multimedia and the Internet More about CSS and Page Layouts.
© 2012 Adobe Systems Incorporated. All Rights Reserved. LEARNING THE LANGUAGE OF THE WEB INTRODUCTION TO HTML AND CSS.
School of Computing and Information Systems CS 371 Web Application Programming HTML The language of the Web.
Working with Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of a document.
Chapter 11 Cascading Style Sheets: Part I The Web Warrior Guide to Web Design Technologies.
Chapter 4 HTML. Objectives Explain how HTML/XHTML are used and describe the difference between them Interpret HTML code Explain how HTML Forms are used.
XP Tutorial 7New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks.
Cascading style sheets (CSS)
HTML & CSS.
Today’s objectives  Complete web page  Using xhtml & CSS  Adding CSS to documents Embed url(File);  CSS.
 XHTML is aimed to replace HTML  XHTML is almost identical to HTML 4.01  XHTML is a stricter and cleaner version of HTML  XHTML is HTML defined as.
CS 299 – Web Programming and Design Introduction to HTML.
XHTML The Basics A brief history of HTML SGML (Standard Generalized Markup Language) Then came HTML Followed by the browser…and the great browser wars.
Today’s objectives  Presentational | Inline | Block | Validate  CSS | Rules | Declarations.
HTML (HyperText Markup Language)
Amber Annett David Bell October 13 th, What will happen What is this business about personal web pages? Designated location of your own web page.
Week 1 Understanding the Web Design Environment. 1-2 HTML: Then and Now HTML is an application of the Standard Generalized Markup Language Intended to.
Learning Web Design: Chapter 4. HTML  Hypertext Markup Language (HTML)  Uses tags to tell the browser the start and end of a certain kind of formatting.
CHAPTER 1 HTML & HTML5 I อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา 1.
Copyright © 2013 MyGraphicsLab / Pearson Education STRUCTURE AND HTML TAGS MyGraphicsLab: Adobe Dreamweaver CS6 ACA Certification Preparation for Web Communication.
Cascading Style Sheets CSS by Pavlovic Nenad by. 2Cascading Style Sheets Presentation Contents What are CSS? What are CSS? History of CSS History of CSS.
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 7.
CSS Cascading Style Sheets. CSS Advantages Greater typography and page layout control Style is separate from structure Styles can be stored in a separate.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Tutorial 7.
Instructional Technology & Design Office or Beginning Web Design Presented by Laura Miller.
HTML: Hyptertext Markup Language Doman’s Sections.
Lesson 4.
XHTML By Trevor Adams. Topics Covered XHTML eXtensible HyperText Mark-up Language The beginning – HTML Web Standards Concept and syntax Elements (tags)
Lecture 2 - HTML and CSS Review SFDV3011 – Advanced Web Development 1.
XHTML and CSS. The Browser The browser is not print!
Web Development & Design Foundations with XHTML Chapter 2 HTML/XHTML Basics.
3. Cascading Style Sheets (CSS) M. Udin Harun Al Rasyid, S.Kom, Ph.D Lab Jaringan Komputer.
Cascading Style Sheets CSS.  Standard defined by the W3C  CSS1 (released 1996) 50 properties  CSS2 (released 1998) 150 properties (positioning)  CSS3.
XP Review 2 New Perspectives on JavaScript, Comprehensive1 Introducing Cascading Style Sheets Formatting Web Pages with CSS.
Web Technologies Lecture 2 HTML and CSS. HTML Hyper Text Markup Language – Describes web documents – Made up of nested HTML markup tags – Tags are the.
CNIT 132 – Week 4 Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of.
Microsoft Expression Web 3 – Illustrated Unit D: Structuring and Styling Text.
Cascading Style Sheets Primary readings Presentations Explain & review projects with class mates.
XP Review 1 New Perspectives on JavaScript, Comprehensive1 Introducing HTML and XHTML Creating Web Pages with HTML.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
Tutorial #1 Using HTML to Create Web Pages. HTML, XHTML, and CSS HTML – HyperText Markup Language The tags the browser uses to define the content of the.
HTML 5 AND CSS Dr Mohd Soperi Mohd Zahid Semester /16.
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 3 Introducing Cascading Style Sheets.
Web Design Principles 5 th Edition Chapter 3 Writing HTML for the Modern Web.
Chapter 1: Intro to HTML Section 1: HTML Structure Presentation Section 2: Layout of an HTML File Section 3: Working with Lists & Tables Section 4: HTML.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
CSS Introductions. Objectives To take control of the appearance of a Web site by creating style sheets. To use a style sheet to give all the pages of.
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 1 Using HTML to Create Web Pages.
Working with Cascading Style Sheets
Overview of XHTML and CSS
Lesson 2: HTML5 Coding.
Presentation transcript:

XHTML and CSS Web Applications

Using HTML/XHTML XHTML is relatively simple. You do most of your work with about twenty tags. XHTML is orderly and structured Good references and tutorial sites are available Follow the standards and your work will be much simpler, more consistent, and your results more reliable –Plus your co-workers will like you more

Device Independence Your audience may view your site with many different devices and browser types.

The Browser The browser is not print!

The Browser Is Not Print No fixed page size No fixed page length User can change the font size User can link to her/his own local style sheet Screen size can be tiny or huge

The Adjustable Document

The Birth of HTML Created by Tim Berners-Lee at CERN Open standard developed under supervision of the World Wide Web Consortium ( –Works to ensure the full potential of the Web for shared, integrated functionality is realized

The History of HTML/XHTML 1992 – HTML first defined 1994 – HTML – Netscape specific non-standard HTML 1996 – HTML 3.2, compromise version 1997 – HTML 4.0, separates content from presentation 1998 – XML standard for writing Web languages 2000 – XHTML 1.0, XML compliant HTML 2002 – XHTML 2.0

Problems With HTML Competing versions of browsers introduced features beyond the standards Inconsistent implementations of display engines and scripting Content and presentation mixed together –Layout often done with tables –Each element had many presentation attributes, resulting in laborious maintenance The “Slop Code Era”

XHTML XHTML is a version of HTML modified to conform to the XML standard Designed to separate content from presentation –Content in XHTML –Presentation controlled by Cascading Style Sheets (CSS) Extensible – Additional elements can be defined XML Compatible – Other XML based languages can be embedded in XHTML documents Like a programming language –Specific syntax to use –Validators help you get it right

XHTML Differences Case is significant All elements must have begin tags and end tags Hello Empty elements contain their own end tag Attribute values must be enclosed in quotation marks More specfics available at

A Simple XHTML File My Home Page My Home Page Welcome to my home page

Hierarchical Structure Well formed xhtml forms a hierarchy

Content Types Documents are made up of logical types of content.

Semantic Structure Content of the same type usually is formatted to look the same.

Semantic Markup HTML markup is based on logical content types

Hierarchy The resulting hierarchy

The DOCTYPE Statement Declares the specific version of HTML or XHTML being used on the page Used by the browser to decide how to process the page Three types –Transitional - Forgiving –Strict – Requires adherence to standards –Frameset – Use if page has frames Always first in file

Strict DOCTYPE Enter exactly as below <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN“ " Using Strict encourages standards based coding –Validators will flag logical errors in your methods –Your CSS will work better and more predictably

Elements Consist of three parts –Begin tag, which can contain attributes –Contents –End tag Example: Welcome W3schools specifications for

Attributes Always only used in the element begin tag Three types –Optional attributes: Varies with element type –Standard attributes: id, class, title, style, dir, lang, xml:lang –Event attributes: onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup Used in scripting

Empty Elements Some elements have no content and therefore also have no end tag – In XHTML, which requires end tags on all elements, a single tag represents both the begin and end tag

,,, etc. Headings on the page Represent the main topic, subtopics, subsubtopics, etc. of the page Important to use they in a logical manner, which greatly helps assistive technology like voice browsers present the page content intelligibly

Paragraph Important for presentation control to put text in an element. When in doubt, put text in a paragraph Blockquotes ( ) except they have wider left and right margins

Lists Unordered lists (bulleted lists) One Two Ordered lists (numbered lists) One Two

Text Markup Bolding – text Italics – text Other – text subscript – text superscript – text deleted text

Tables People on the team Name Position Mary Analyst John Technician

Graphics Graphics are placed by using an img element The alt attribute provides alternative text describing the graphic in case the graphic itself cannot be shown or the user cannot see the graphic

Anchors Anchors can link your page to any file on the Web abcde

Divs Divs enclose a set of elements News Budget Investment

Spans Spans enclose objects (text, graphics) within an element Call me Ishmael. Some years ago — never mind how long precisely — having little or no money in my purse, and nothing particular to interest me on shore,

Cascading Style Sheets Are used to control how elements are presented in the Web page Use a different syntax that HTML/XHTML Work with the common visual browsers (Internet Explorer, FireFox, Opera) Used properly, can great simplify visual design, site management and content maintenance

A Style Selector Property Value p { font-family: times; } Note the punctuation: The property is followed by a colon (:) and the value is followed by a semicolon(;)

Using CSS Styles can be set in a stylesheet, in a style element in the head or in a style attribute

Selectors Simple selectors p { color: blue } h1, h2, h3, h4 { font-style: italic; } Contextual selectors ul li { font-weight: bold; } #main img { border: solid black 5px; } p.intro { font-family: verdana, sans-serif;}

The Box Model Each element has padding, border, and margin

Vertical Margins The larger of the two vertical margins will determine the distance between elements

Visual Formatting Model Pages are built as a series of blocks stacked from the top down

Controlling Layout Styles can control size and placement of elements Example: #nav { width: 12em; float: left; } #news { width: 12em; float: right; } #main { margin: 1em 13em 1em 13em;

Nav Div Float Left

Nav Div Float Right

Nav Across Top Items in the Nav bar are anchors within a div

HTML-Kit HTML-Kit (Windows) is free editor that makes it easy to make standards compliant XHTML

HTML-Kit Has Tidy Press F9 and your XHTML is validated and tidied for easy reading

Resources HTML-Kit editor – Amaya editor – W3schools XHTML and CSS tutorials – Web Head Start tutorials – CSS Validator - Dave Raggett XHTML and CSS tutorials - Web Accessibility in Mind (WebAIM) - Color contrast analyzer - Stylin’ With CSS, A Designer’s Guide, Second Edition by Charles Wyke-Smith