Why use Web Standards The Three Layers of

Why use Web Standards?

The Three Layers of the Web

What are Web Standards? Web standards are technologies, established by the W 3 C and other standards bodies, that are used to create and interpret web-based content. These technologies are designed to future-proof documents published on the Web and to make those documents accessible to as many people and devices as possible.

What are Web Standards? When the Internet and the Web became mainstream in the second half of the nineties, web browser vendors had not yet implemented CSS (Cascading Style Sheets) well enough for web developers to be able to use it to control the presentation of an HTML document.

What are Web Standards? The lack of implementation is partly understandable considering that the specification for CSS Level 1 was published in 1996 and the specification for CSS Level 2 in 1998.

What are Web Standards? The lack of CSS support in web browsers, combined with demands from graphic designers used to the level of control that is possible when working with printed material, led to the abuse of HTML in any way possible to control the visual presentation of a web page.

What are Web Standards? One example of this is the major “breakthrough” that was made when designers discovered that by using the attribute border=“ 0" to hide the borders of an HTML table, an invisible grid that could be used to control layout was created. Another example is the use of transparent, and thus invisible, images called “spacer GIFs” to control spacing and margins.

What are Web Standards? Since HTML was never meant to be used to control the presentation of a document, hacks, invalid code, and vendorspecific elements and attributes were (and still are) used. Validation was something that very few knew about or used.

What are Web Standards? As new versions of web browsers were released, CSS support was improved and extended, but not at the rate it should have been.

What are Web Standards? However, there is no longer any reason not to use HTML the way it was meant to be - to describe the structure and content of a document and not its presentation. For that, we can now use CSS, which was designed specifically for that purpose.

Structural languages HTML (Hypertext Markup Language) 4. 01 XHTML (Extensible Hypertext Markup Language) 1. 0 XHTML 1. 1 HTML 5 XML (Extensible Markup Language) 1. 0

Presentation languages CSS (Cascading Style Sheets) Level 1 CSS Level 2 revision 1 CSS Level 3 (in development) Math. ML (Mathematical Markup Language) SVG (Scalable Vector Graphics)

Object Models DOM (Document Object Model) Level 1 DOM Level 2 DOM Level 3 Core

Scripting languages ECMAScript 262 (the standardised version of Java. Script)

What are Web Standards? When a document is said to adhere to web standards, it means that the document besides using the above technologies: Consists of valid HTML or XHTML Uses CSS instead of tables for layout Is properly structured and semantically marked up Works in any web browser

What are Web Standards? “Works in any web browser” does not mean “looks the same in every web browser”. Making a document look identical across browsers and platforms is next to impossible.

What are Web Standards? Documents that are published on the web will be accessed by a wide variety of browsing devices on several operating systems, with monitors of differing size and quality (or no monitor at all), by users who may have changed their browser’s default text size and other preferences.

Why use Web Standards? Some web developers and web designers have a resistance towards using web standards. Common arguments are “It’s too difficult”, ” It works anyway”, and “The tools I use create invalid code”.

Why use Web Standards? Simpler development and maintenance: Using more semantic and structured HTML makes it much easier and quicker to understand code created by somebody else. Compatibility with future web browsers: When you use defined standards and valid code you future-proof your documents by reducing the risk of future web browsers not being able to understand the code you have used.

Why use Web Standards? Faster download and rendering of web pages: Using CSS for presentation tends to make HTML documents leaner which means quicker downloads for your visitors. Better accessibility: Semantic HTML, where structure is separated from presentation, makes it easier for screen readers and alternative browsing devices to correctly interpret the content.

Why use Web Standards? Better search engine rankings: The separation of content and presentation makes the content represent a larger part of the total file size. Combined with semantic markup this generally improves search engine rankings.

Why use Web Standards? Simpler adaptation: A semantically marked up document can be easily adapted to print and alternative browsing devices, like handheld computers and mobile phones, just by linking to a different CSS file. You can also make site-wide changes to presentation by editing a single file.

W 3 C HTML Specifications and Timeline Specification HTML 3. 2 HTML 4. 01 HTML 5 Recommendation 14. January 1997 24. April 1998 24. December 1999 19. October 2010 (latest draft)

W 3 C XHTML Activities XHTML is a stricter and cleaner version of HTML.

XHTML Versions – 1. 0 XHTML 1. 0 became a W 3 C Recommendation 20. January 2000. XHTML 1. 0 Second Edition became a W 3 C Recommendation 1. August 2002. The second edition was not a new version, but an update and a "bug-fix".

About XHTML 1. 0 was the first major change to HTML since 1997. XHTML was an important step for creating a standard that provided richer web pages on a wider range of user agents (browsers), like desktop PCs, mobile (wireless) devices, and cell phones.

About XHTML 1. 0 reformulates HTML 4. 01 in XML. XHTML 1. 0 relies on HTML 4. 01 for the meanings of the HTML tags. W 3 C's next step included modularization of XHTML into smaller element collections, to make it easier to combine XHTML with other markup languages, like vector graphics or multimedia.

About XHTML 1. 0 Modularization of XHTML reduced development costs, improved cooperation with other applications (like databases), easier communication with different user agents, and cleaner integration between HTML and different XML standards.

W 3 C XHTML Activities - XHTML 1. 0 is a reformulation of HTML 4. 01 in XML.

W 3 C CSS Activities CSS defines HOW HTML elements are to be displayed.

CSS Versions CSS 1 became a W 3 C Recommendation 17. December 1996. CSS 2 became a W 3 C Recommendation 11. January 1999. CSS 2 has added support for media (printers and aural devices), downloadable fonts, element-positioning and tables.

CSS Versions CSS 3 is about breaking CSS into smaller modules.

W 3 C XML Specifications and Timeline Specification CSS 1 (Revised) CSS 2 Draft/Proposal Recommendation 17. Dec 1996 11. Apr 2008 12. May 1998 CSS 2. 1 CSS Mobile Profile 2. 0 CSS TV Profile 1. 0 CSS Print Profile 08. Sep 2009 10. Dec 2008 14. May 2003 13. Oct 2006

W 3 C XML Specifications and Timeline Specification CSS 3 Draft/Proposal Recommendation 23. May 2001 CSS 3 Namespace CSS 3 User Interface CSS 3 Selectors CSS 3 Fonts CSS 3 Colors CSS 3 TV CSS 3 Backgrounds and borders 23. May 2008 11. May 2004 10. Mar 2009 18. Jun 2009 21. Jul 2008 14. May 2003 10. Sep 2008

W 3 C XML Specifications and Timeline Specification CSS 3 Text CSS 3 Lists CSS 3 Line Draft/Proposal Recommendation 06. Mar 2007 07. Nov 2002 15. May 2002 CSS 3 Box model CSS 3 Multi column CSS 3 Ruby CSS 3 Speech 09. Aug 2007 30. Jun 2009 14. May 2003 16. Dec 2004

W 3 C XML Specifications and Timeline Specification CSS 3 Paged Media (PM) CSS 3 Generated PM CSS 3 Print Draft/Proposal Recommendation 10. Oct 2006 04. May 2007 13. Oct 2006 CSS 3 Values CSS 3 Cascade CSS 3 Template Layout CSS 3 Media Queries 19. Sep 2006 15. Dec 2005 02. Apr 2009 15. Sep 2009
- Slides: 36