Principles of Web Design 6 th Edition Chapter 1 – HTML5.

Slides:



Advertisements
Similar presentations
CSCI N241: Fundamentals of Web Design Copyright ©2004 Department of Computer & Information Science Introducing XHTML: Module B: HTML to XHTML.
Advertisements

Cascading Style Sheets
1 HTML Standards & Compliance. 2 Minimum Required HTML tags: (must go in this order!)
XHTML Basics.
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.
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.
Tim Berners-Lee authors HTML in 1991, assisted by his colleagues at CERN,
HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure.
XHTML 16-Apr-17.
17-Jun-15 XHTML 2 What is XHTML? XHTML stands for Extensible Hypertext Markup Language XHTML is aimed to replace HTML.
F DIGITAL MEDIA: COMMUNICATION AND DESIGN INTRODUCTION TO XML AND XHTML.
Chapter 1 Understanding the Web Design Environment
Upgrading to XHTML DECO 3001 Tutorial 1 – Part 1 Presented by Ji Soo Yoon 19 February 2004 Slides adopted from
Working with Cascading Style Sheets. 2 Objectives Introducing Cascading Style Sheets Using Inline Styles Using Embedded Styles Using an External Style.
Developing a Basic Web Page with HTML
Introducing XHTML: Module B: HTML to XHTML. Goals Understand how XHTML evolved as a language for Web delivery Understand the importance of DTDs Understand.
Chapter 2 Introduction to HTML5 Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Chapter 14 Introduction to HTML
Introducing HTML & XHTML:. Goals  Understand hyperlinking  Understand how tags are formed and used.  Understand HTML as a markup language  Understand.
Computer Sciences Department
Chapter 1 Variables in the Web Design Environment.
Chapter 1 Variables in the Web Design Environment
Creating Web Pages with HTML
Creating a Simple Page: HTML Overview
1 Networks and the Internet A network is a structure linking computers together for the purpose of sharing resources such as printers and files Users typically.
Principles of Web Design 6 th Edition Chapter 4 – Cascading Style Sheets.
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.
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.
Creating a Basic Web Page
Week 1.  Phillip Chee   Ext.1214 
Lesson 4: Using HTML5 Markup.  The distinguishing characteristics of HTML5 syntax  The new HTML5 sectioning elements  Adding support for HTML5 elements.
CS 299 – Web Programming and Design Introduction to HTML.
Chapter 1 Understanding the Web Design Environment Principles of Web Design, 4 th Edition.
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.
Chapter 1 XHTML: Part I The Web Warrior Guide to Web Design Technologies.
XHTML1 Building Document Structure Chapter 2. XHTML2 Objectives In this chapter, you will: Learn how to create Extensible Hypertext Markup Language (XHTML)
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.
1 XHTML محمد احمدی نیا 2 Of 19 HTML vs XHTML  XHTML is a stricter and cleaner version of HTML.  by combining the strengths of HTML.
XHTML. Introduction to XHTML What Is XHTML? – XHTML stands for EXtensible HyperText Markup Language – XHTML is almost identical to HTML 4.01 – XHTML is.
Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and attributes Create.
Copyright © 2013 MyGraphicsLab / Pearson Education STRUCTURE AND HTML TAGS MyGraphicsLab: Adobe Dreamweaver CS6 ACA Certification Preparation for Web Communication.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
XHTML1 Introduction to Web Pages Chapter 1. XHTML2 Objectives In this chapter, you will: Learn about the World Wide Web (WWW) Create simple Hypertext.
Chapter 1 Understanding the Web Design Environment Principles of Web Design, 4 th Edition.
XHTML By Trevor Adams. Topics Covered XHTML eXtensible HyperText Mark-up Language The beginning – HTML Web Standards Concept and syntax Elements (tags)
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Creating XHTML Documents Essentials for.
1 Web Application Programming Presented by: Mehwish Shafiq.
XML Design Goals 1.XML must be easily usable over the Internet 2.XML must support a wide variety of applications 3.XML must be compatible with SGML 4.It.
Lecture: Web Design Assis. Prof. Freshta Hanif Ehsan Faculty of Computer Science Kabul Polytechnic University Spring Semester
CNIT 132 – Week 4 Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of.
©SoftMoore ConsultingSlide 1 Introduction to HTML: Basic Document Structure.
2.1 XHTML. Motto High thoughts must have high language. –Aristophanes.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
Microsoft Expression Web 3 – Illustrated Unit D: Structuring and Styling Text.
Objective: To describe the evolution of the Internet and the Web. Explain the need for web standards. Describe universal design. Identify benefits of accessible.
XP Review 1 New Perspectives on JavaScript, Comprehensive1 Introducing HTML and XHTML Creating Web Pages with HTML.
Web Design Principles 5 th Edition Chapter 3 Writing HTML for the Modern Web.
Building a Web Page. A Brief History In 1989, Tim Berners-Lee invented the Web. To enable particle physics from around the world to organize and share.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 1 Using HTML to Create Web Pages.
Working with Cascading Style Sheets
Introduction to XHTML.
Web Programming– UFCFB Lecture 9
Understand basic HTML and CSS terminology, concepts, and basic operations. Objective 3.01.
Web Programming– UFCFB Lecture 9
Lesson 2: HTML5 Coding.
Presentation transcript:

Principles of Web Design 6 th Edition Chapter 1 – HTML5

Objectives Create web pages with HTML Add style with CSS Describe the history of HTML Work with HTML5 Use good coding practices 2

Creating Web Pages with HTML 3

HTML is a markup language that lets you identify common sections of a web page Markup elements define each section This element defines text as a first-level heading: What is HTML? 4

5

HTML Syntax Web page code is a mixture of the text the user sees in the browser surrounded by a variety of markup elements An element is a pair of HTML tags containing content An HTML tag includes an opening bracket (<), an element name such as h1, and a closing bracket The end tag has a slash ( / ) preceding the element. 6

HTML Syntax Some HTML elements contain only a single tag. These are known as void elements Void elements insert something onto the page, such as a new line using the element 7

HTML Syntax 8

Some HTML elements support attributes that let you provide more information about an element Here is an attribute (shown in bold) added to an element: Main Title of the Document 9

Structure of a Basic Web Page The HTML file contains content text and HTML markup The HTML markup does not appear in the browser The browser interprets the code and displays the results 10

Structure of a Basic Web Page The document type, or doctype for short, specifies the rules for the document language The tag is the root element The two main sections are the and elements The head section is the container for all of the descriptive information about the document The section includes the content that the user sees in the browser window 11

12

HTML in the Browser The browser interprets the HTML markup elements and displays the results, hiding the actual markup from the user Each browser interprets HTML in its own way, based on its rendering engine It is essential that you test your work in different web browsers 13

14

Adding Style with CSS Web designers use Cascading Style Sheets (CSS) to add presentation information to web pages With CSS you can display information for different devices With style sheets, the presentation properties are separate from the content CSS lets you control the presentation characteristics of an entire web site with a single style sheet 15

16

Adding Style with CSS The next two figures show CSS style rules and the result in the browser The style rules in Figure 1-9 specify that the body text for the page will be Arial, the h1 will have a bottom border, and the paragraph will have a 30-pixel left margin Figure 1-10 shows the results in the browser 17

18

19

CSS Syntax Style rules express style characteristics for an HTML element For example, the following style rule sets all elements to blue text: P {color: blue;} Style rules contain a selector and a declaration You will learn more about CSS in Chapter 4 20

Organizing Information with Hypertext The World Wide Web links information on related topics using hypertext You determine which terms to create as hypertext links and where users end up when they click a link The different types of linked content and media continually evolve 21

Understanding the History of HTML 22

The History of HTML As a web designer, you will encounter all types of HTML coding practices Understanding the evolution of HTML will help you understand various web design methods To be a successful web designer, you need to understand the past, present, and future directions of HTML, coding standards, and common practices 23

The History of HTML Tim Berners-Lee first proposed HTML at the European Laboratory for Particle Physics (CERN) in 1989 Berners-Lee joined the ideas of the browser, a markup language (HTML), and a communications protocol that allowed hypertext linking Not only could people read documents, they could easily create them using HTML 24

The History of HTML HTML is an application of the Standard Generalized Markup Language (SGML), a standard system for specifying document structure Berners-Lee joined the ideas of the user interface (browser), a markup language (HTML), and a communications protocol ( that allowed hypertext linking 25

A Need for Standards The World Wide Web Consortium (W3C) was founded in 1994 MIT The World Wide Web Consortium sets standards for HTML and other markup languages Jointly developed standards, rather than ones dictated by one vendor, benefit everyone 26

A Need for Standards 27

XML and XHTML – A New Direction In 1997, the W3C released XML, the Extensible Markup Language XML is essential to creating applications for the web XML lets developers define their own markup language XML has a stricter syntax than HTML 28

XML Syntax Rules Documents must be well-formed All tags must nest properly and not overlap Use all lowercase for element names Always use closing tags Empty elements are signified by a closing slash Attribute values must be contained in quotation marks 29

Sample XML An Ode to the Web So many web sites So little time And all I want to do Is critique their design! 30

XML and XHTML – A New Direction XML syntax provides a solution to the problem of widely varying HTML coding standards The W3C combined XML and HTML to create XHTML XHTML follows the rules of XML Web developers readily adopted XHTML and CSS to standardize coding Many web sites benefited from leaner standardized code 31

Problems with XHTML Relaxed syntax rules still must be applied because of legacy code Newer versions of XHTML moved too far away from existing web development XHTML was not well received by the development community 32

A Proposal for HTML5 The Web Hypertext Application Technology Working Group (WHATWG) proposed HTML5 HTML5: – Supports standards-based coding – Compatible with HTML and XHTML – Compatible with CSS – Supports new page layout elements – Application and media compatible 33

Working with HTML5 34

Working with HTML5 HTML5 attempts to address shortcomings of HTML – Logical sectioning elements – Rich media – Support for applications Removes old features: – All display elements have been removed in favor of CSS – Framesets are gone 35

Working with HTML5 HTML5 looks almost exactly like previous versions of HTML The HTML5 statement is less complicated than in previous versions of HTML The element specifies the document content type and character set. Many pages leave out this critical piece of information that tells the browser how to correctly interpret your HTML code 36

37

Working with HTML5 HTML5 offers two syntaxes: – An HTML-compatible syntax – An XML-compatible syntax HTML-compatible syntax – More relaxed syntax – Code shortcuts allowed XML-compatible syntax – Consistent with XHTML – Uses XML syntax rules 38

39

40

Choosing the Correct Syntax It is a best practice to code using syntax that follows the stricter syntax rules, which are based on XML rules The code you create for web content can have multiple purposes and potentially be used in a variety of display and application environments 41

Choosing the Correct Doctype Always use a doctype statement Using a doctype forces the browser to display in standards mode The standard doctype statement for HTML5: 42

Choosing the Correct MIME type Multipurpose Internet Mail Extensions (MIME) defines content types for the web Determines the type of document Declared in a element in the section Also contains a character set identifier Your element should look like this: 43

Creating Syntactically Correct Code Documents must be well-formed All tags must nest properly and not overlap Use all lowercase for element names Always use closing tags Empty elements are marked with a closing slash Attribute values must be contained in quotation marks 44

HTML5 Element Categories Metadata content Flow content Sectioning root Sectioning content Heading content Phrasing content Embedded content Interactive content Transparent 45

New Elements in HTML5 HTML5 has a number of new elements; see Table 1-2 in the text All elements are supported by all modern browsers 46

Attributes in HTML5 Elements can contain attributes that set properties Earlier versions of HTML had more attributes HTML5 has less attributes because of CSS Global attributes can be applied to any element 47

Obsolete Elements in HTML5 Many elements have been removed in HTML5, mostly involving presentation effects Framesets are no longer available 48

Using HTML5 Elements for Page Structure Most web pages contain common characteristics: – Header – Navigation – Articles – Figures – Footers – Sidebars Until recently, most web pages were marked up with elements and id or class names 49

50

Using HTML5 Elements for Page Structure The HTML5 elements for page layout include: – Contains the page header content – Contains the navigation elements for the page – Contains the primary page content – Defines sections or groupings of page content – Contains additional content such as a quote or sidebar – Contains images for the article content – Contains page footer content 51

Using HTML5 Elements for Page Structure HTML5 offers a new set of elements for describing document structure HTML5 replaces the use of with named elements to structure the page The element can be used instead of the element, for example: This is the main content of the web page 52

53

Interactive Capabilities in HTML5 Audio and video Drawing canvas Background application processing Local data storage 54

Use Good Coding Practices 55

Using Good Coding Practices Creating code that ensures the greatest standards-compliance, presentation, and usefulness of your content – Stick to the standards – Use semantic markup – Validate your code 56

Stick to the Standards Stick to the W3C standards Separate content from presentation Plan to be accessible to different devices Standardized design is more accessible 57

Use Semantic Markup Semantic markup identifies the intended use of document sections Accurately describes each piece of content Until recently, this logical use of the HTML elements was largely ignored Document elements match the meaning and usage of the document sections: for paragraph, for top-level heading, and so on 58

Validate Your Code Valid code conforms to the usage rules of the W3C The lack of valid code is a major problem Valid code enhances browser compatibility, accessibility, and exchange of data The most common mistakes include: – No doctype declaration – Missing closing tags – Missing alt attributes in elements – Incorrect tag nesting – Unquoted attributes 59

60

Summary Make sure to check for support of new HTML5 elements Use Cascading Style Sheets Code to the stricter HTML5 standard Use good coding practices Use semantic markup 61