Working with Web Standards

Working with Web Standards


Separation of concerns is something that experienced developers think about all the time. When you’re developing a web application that has models, controllers, and views, it’s considered the good practice to separate your display logic from your business logic. Web designers understand this concept pretty well, too. A website designed with web standards in mind will have its content separated from the design and the behavior. When you hear someone talking about designing with web standards, that person is referring to using standardized best practices and philosophies. Standards bodies such as the World Wide Web Consortium (W3C) set many of these standards. Others standards are simply best practices set by pioneers of the web-design community. A website or web page that is in compliance with web standards has the following attributes:
 • The content and structure is marked up using valid HTML or XHTML. This includes using a proper doctype and character set.
 • The presentation is rendered using valid CSS. This means that CSS governs the site’s layout, font colors, font styles, page colors, and other non-content-related presentation aspects.

• The web page should be accessible to everyone, regardless of the web browser, platform, or disability.

 • The site meets basic usability guidelines for navigation, links, and structure.

• Behavior is separated from the content and its presentation. JavaScript that works on all platforms is used, and it degrades gracefully for platforms, devices, and users who can’t use it. This list sounds reasonable, but how do you implement something like this? You start by building a valid HTML document that contains your content and defines your structure. If you’ve ever composed simply HTML, this will be a piece of cake for you. But don’t worry: even if you’ve never dabbled in HTML before, you’ll pick up the lessons in this chapter quickly.

Post a Comment