Creating Modern, Responsive Websites With Web Standards

Website Standards and Clean Code

It isn’t that difficult to create a modern website based on current web standards. If your website was built using the latest technology, your site will be super-fast, modern, clean and responsive.

Everyone wants their website to cost less, work better, and reach more people in today’s browsers, screen readers, and wireless devices. The inescapable technological advancements that are happening as we speak are breaking websites all over the internet. A modern website built using the latest coding practices ensures that your website will function properly across all devices and help individuals with disabilities who are using special devices to access and interact with the internet – and stand the test of time.

You don’t have to spend money on trendy, short-sighted, proprietary solutions that will end in disaster. No one can afford to piecemeal a website that will ultimately break sooner than later.

Coding several different stylesheets might have seemed like a great idea at the time, but it is not a rational solution to problems that are continuing to plague site owners and builders.

FORWARD COMPATIBILITY

WaSP (www.webstandards.org) advocates standards that reduce the cost and complexity of site creation and ensure simple, affordable access for all. Today, every browser supports web standards as a matter of course. They work with the designers of development tools such as Dreamweaver. You can find a myriad of web standards educational tools and this information can be found in most languages today.

Apple’s latest WebKit based Safari browser, which powers the iPhone’s web browser, Mozilla powered Firefox, Opera, the WebKit based Google Chrome, and Microsoft Internet Explorer 7+ understand and correctly support XHTML, CSS3, JavaScript, and the DOM.
*Internet Explorer 6 does not support many of the latest web standards, and we can only hope that everyone has moved passed this version of IE. Developers know that we can fix IE6 to some degree, but there comes a time when you have to move forward and not look back. We’ve stopped overkill fixes because newer phones are equipped with the latest browsers and it just doesn’t warrant the extra time and expense anymore to work out ALL the fixes needed for IE6 to view properly.

WHAT IS WEB STANDARDS COMPLIANT?

javascript

JavaScript creates action.  JavaScript is the bomb. This language has given us the ability to create action!
In a perfect world, browsers perfect their support for every single standard. Considering that most software doesn’t come out bug-free, and standards are sophisticated and complex, cross-browser support is actually pretty solid enough that we do develop using the latest standards. HTML5, more accessibility, CSS3, structured markup and deeper DOM and JavaScript function calls are becoming the progressive-enhancement that is pushing the internet into the future. All the big companies such as Apple, MSN, Wikipedia, and WordPress have embraced web standards. Of course, they don’t always achieve perfect validation or pure semantic markup, but a trained developer can make these markup fixes very quickly, and let’s face it, modern browsers are lenient.

STANDARDS ARE THE TOOLS WITH WHICH ALL OF US CAN DESIGN AND BUILD SOPHISTICATED, BEAUTIFUL SITES THAT WILL WORK TODAY AND TOMORROW.

OLD BROWSERS ARE INCOMPETENT, INCOMPLETE, AND HAZARDOUS TO THE HEALTH OF THE WEB.

GARBAGE IN, GARBAGE OUT.

More than 90% of all websites are obsolete. They might look good on desktop browsers, but outside of that, the symptoms of decay are starting to appear. Carefully constructed layouts have begun to fall apart, and expensively engineered behaviors have stopped working. As browsers evolve, site performance continues to deteriorate.

Modern browsers are not merely newer versions of the same old thing. They differ fundamentally from their predecessors, and in many cases, they’ve been rebuilt from the ground up. They have a new job: to comply as well as possible with the web standards. As the newer browsers comply with web standards, they are becoming increasingly intolerant of broken code and markup.

THE KNOWLEDGE OF WEB STANDARDS IS A NECESSITY FOR ANYONE WHO DESIGNS OR PRODUCES WEBSITES

BEST WEBSITE NOW ENSURES THAT SITES DESIGNED TODAY WILL CONTINUE TO WORK IN TOMORROW’S BROWSERS AND DEVICES – INCLUDING DEVICES NOT EVEN BUILT OR IMAGINED YET

We believe in “write once, publish everywhere”. It isn’t wishful thinking. We are proud of the fact that our mission statement is “Because it matters”. Our mission follows some basic rules:

Control layout, placement, and typography in desktop browsers while allowing users to modify the presentation to suit their needs.
Develop and support sophisticated behaviors that work across multiple browsers and platforms.
Comply with accessibility laws and guidelines without sacrificing beauty, performance, or sophistication.
Redesign quickly – reducing costs and eliminating unnecessary work.
Support emerging devices from wireless gadgets and smart phones to Braille output devices and screen readers used by those with disabilities with one website.
Offer sophisticated printed versions of any web page.
Stay educated and ahead of the curve to always use real semantic markup.

PAGE RANKING AND SEO

iStock_000022200278Large

SEO and Analytics go hand-in-hand.  Believe it or not, companies do not have to spend a lot of money for SEO or Analytics. Well thought out SEO makes your website findable. Content is king. Focus on lean, keyword-rich, buzzword-free content that’s relevant to your customers, and use semantic markup. Copy, CSS layout and HTML5’s latest coding practices are the golden keys to findability.

COMPANIES THAT KNOW THE SIMPLICITY OF GREAT SEO ARE PROSPERING. THOSE THAT DON’T ARE FALLING BEHIND.

ACCESSIBILITY – THE HEART OF WEB STANDARDS…

Accessibility makes sure your content can be read and your site can be used by everyone, no matter what device they browse with, and regardless of physical ability. Innovation is the soul of accessibility. Accessibility is legal standard for judging and enforcing the accessibility of sites. This is great news because the world is being pushed into one single standard.

If you use standards-based designing principles, you not only make your content easy for search engines to find, it will also enable visually disabled people who use screen readers to navigate your websites content.

Screen reader users navigate web pages by tabbing from h2 to h2 and from section to section, just like sighted users navigate by visually scanning. When structuring your site semantically, pay particular attention to forms and tables. Provide keyboard access for those who are unable to use a mouse. Keyboards and assistive devices are the gateway to online user experience.

WELCOME MILLIONS OF VISITORS TO YOUR SITE WHO ARE LOCKED OUT – YES – THERE ARE MILLIONS OF DISABLED PEOPLE IN THE WORLD WHO HAVE ACCESS TO THE INTERNET

iStock_000020458543XSmall
Google web crawlers look for relevancy of content when a user types in an inquiry.
Think of web crawlers as blind users – Google is the biggest blind user on the web. Dish out appropriate content, well written and well structured, and you not only serve the blind folks in your audience, you also attract millions of sighted ones.

It wouldn’t be smart to exclude disabled Americans. This demographic would take up a city the size of Los Angeles or New York City. Millions!

If you think blind people don’t buy products online is missing the point and the boat. Don’t be blind yourself to the true nature of the audience you reject – you are still reaching the non-disabled populace this way by conforming to access guidelines and many others who would have ordered your products over the phone if only your site let them.

Section 508

Section 508 requires all websites under its jurisdiction to provide “equal or equivalent access to everyone” to accommodate the visually impaired, the hearing impaired, the physically disabled, and people who have photosensitive epilepsy and it spells out what accessibility really means. This law covers computers, fax machines, copiers, telephones, transaction machines, and kiosks, as well as other equipment used for transmitting, receiving, or storing information. It also covers many websites. Section 508 became U.S. law in 2001 and applies to the following:

  • Federal departments and agencies (including the U.S. Postal Service)
  • Deliverables from contractors who serve them
  • Activities sponsored or funded by the Federal government
  • Activities sponsored by states that have adopted the regulations
  • This is just skimming the surface and you can find plenty of resources to explain what the exact standards are and how to apply them along with specific things to do to make your site 508 compliant.

The bottom line is that if you design with web standards and follow the guidelines, your site should be accessible to screen readers, Lynx, mobile devices, and old browsers as it is to modern, compliant browsers. Standards and accessibility converge in agreeing that one web document should serve all readers and users. Even Flash and PDF’s can now be made accessible.

MYTH: ACCESSIBILITY IS EXPENSIVE

Most tasks to bring a website to its best take minutes to accomplish. Simple tasks like adding a label to your web form or writing a table summary. Type a brief alt text for each image – which is a no-brainer. High level conformance is going to obviously fall under another category and will cost more. If you want to author closed captions for web videos or to caption live streaming media news feeds in real time see Joe Clark’s “Best Practices in Online Captioning” . (www.joeclark.org/access/captioning/bpoc)

I highly recommend the following cited book for anyone who builds things for the internet. Web Standards is such an exciting concept that ties us all together. Where we go from here who knows, but right now we are accomplishing a great thing using Web Standards, and this book is a must have.

You can find the latest Standards and beta versions of some brilliant new concepts existing on the W3C website. Their HTML5 Validator is a great place to find semantic errors within your page. Go to http://validator.W3.org/ for the latest information.

Jeffrey Zeldman with Ethan Marcotte (2010). Designing with Web Standards, Third Edition. Berkeley, CA. New Riders.

CSS3 – Design with Color Control and Opacity

CSS3 has the ability to control color opacity.

There are many degrees of translucence between total transparency and total opacity.  Web Designers often use opacity for visual appeal in conjunction with mouseover events for pop-up photo galleries as well as drop-down and flyout menus.

hex_colorsColor is a big part of a website, and you can color anything and everything using CSS.

There are 16 valid color names:

black, silver, gray, white, maroon, red, purple, fuchsia, green, lime, olive, yellow, navy, blue, teal, and aqua.

Hex Codes

Virtually all modern screens can show at least 16.7 million colors, and CSS provides several ways to define all those colors.  The most common method of defining colors is to use a hex code.  This allows you to define a color using three pairs of hexadecimal numbers representing red, green and blue.  A zero indicates none of that color.  An ff indicates that color at full strength.  Example: #000000 is black – none of any color; #ffffff is full white – full strength of every color; #ff0000 is red – full strength, no other color; #00ff00 is green – no red, full strength green, no blue.

You can also use a three-digit shorthand syntax to express colors where each pair of digits has matching characters.  The browser actually doubles each of the digits to translate to six digits.  Example:  #000 is short for #000000; #0f0 is short for #00ff00.  The letters aren’t case-sensitive, so you can use uppercase or lowercase.

RGB Codes

rgbRGB is another way to express any of the 16.7 million colors.  Like hex, you define a color using a combination of red, green, and blue, but you use the 255 decimal range of 0 to 255, and you don’t need the # character.  The syntax used is rgb(red,green,blue).  You replace the red, green, and blue each with a whole number in the range of 0-255 to indicate the amount of that color.  Or, optionally, each number can be a percent in the range of 0% to 100%.  You can’t mix percent and numbers though.  Example:  rgb(0,0,0) is black, and it is the same as saying rgb(0%,0%,0%) or hex code #000!  There is no technical advantage or disadvantage to any particular method, it’s your call.

HSL Color

hslAnother way to express any of the 16.7 million colors available to you is Hue, Saturation, and Lightness (HSL) which is based on the concept of a hypothetical color cylinder.  The syntax for expressing color using HSL is hsl(hue, saturation, brightness).

Hue is the basic colors of the rainbow, and all the colors circle the hypothetical cylinder.  The cylinder is round, so 360 degrees around.  Red is at 0 degrees, green is at 120 degrees, blue is at 240 degrees.  At exactly 360 degrees, it goes back full circle to red.

Saturation increases as you move out from the center of the cylinder.  It is how much of the color there is.  Picture a bottle of perfectly red ink.  That would be 100% saturation, near the outside of the cylinder.  Take a drop of that ink and drop it into a glass of clear water.  It’s red, but it is at a low saturation, maybe 1%, near the inside of the cylinder.

Lightness is how much light is hitting the color.  No light is 0 (zero) and would render it black near the bottom of the cylinder.  Too much light (100) would render white at the top of that imaginary cylinder.

So looking at hsl(hue, saturation, brightness), you replace hue with hue expressed as a number indicating degrees around the cylinder with red at 0 (zero), green at 120, and blue at 240.  You can use any number in the range of 0 to 360.  You can express saturation as a number the range of 0% (no saturation) to 100% (full saturation).  Lightness, too, ranges from 0% (totally dark) to 100% (totally light) with 50% being the standard lighting.

It is important to keep in mind that hex, RGB, and HSL are just different ways of expressing the same 16.7 million colors.  There is no right way or better way.  It is up to you, the developer.

Translucent color expression is made using rgb() or hsl() coloring methods and using a fourth value for opacity.

Opacity, or transparency, and translucency all describe how much you can see through something.   The syntax for transparency is rgba(red, green, blue, opacity) or hsla(hue, saturation, lightness, opacity).  The “a” stands for alpha transparency.  The opacity value is new to CSS3 so some older browsers won’t handle them correctly.  You will want to set a background color as the default for the older browsers followed by the hsla() or rgba() values, including the opacity value.  The newer browsers will read the second value in this statement:

#wrapper {
background: white;
background: rgba(255,255,255,.8);
}

The opacity value is a number between .01 to .99 – the larger the number, the more opaque the color.  Zero is no opacity (transparent) and 1 is opaque.

Opacity property

The opacity property also has the syntax opacity: value;.  The value can be any number in the range of 0 to 1 where 0 is totally transparent and 1 is opaque.  This property is great because is applies to images and entire containing elements!

<td style=”opacity: .1″>
<image src=”images/felix.jpg” alt=”felix the cat” />
</td>

You can give each cell its own opacity value using an inline style.  You can have elements on a page that are completely invisible by using the syntax visibility: value; with either hidden or visible for the value.  It still takes up the space although it is not visible.

Use the syntax display: none; if you want to remove an element from the flow entirely. Use display: block; to make it visible.

By default, block elements are however tall they need to be to contain their content.

So, this has been a great lesson for me and I hope it helps someone else down the road.

Christina Descalzo
Kennesaw State University – HTML5 & CSS3 Certified

PC’s, Tablets, Handheld Devices – How to Build a Better Website

Website Design – What About Hand-Held Devices?

A website looks different on a tiny hand-hand with a resolution of  960×640 than it does on a 23″ monitor with a resolution chosen of 1920×1080.  The monitor size and screen resolution choices which are separate issues can vary significantly.  You have the tablet, a 15 inch Mac with 1440×90 resolution, a 23 inch PC with 1920×1080 resolution.  Monitor size alone comes in 6 inches, 13 inches, 15 inches, 17 inches, 19 inches, 21 inches, 23 inches, etcetera.

Designing a site with this in mind makes it easier to understand that the site should be flexible and ready for drastic changes that would benefit the hand-held device.

Basically, you can create a beautiful website which can be viewed on most PC’s monitor sizes varying from 13 inches to 24 inches and larger.  If your site is flexible, in most cases, you wouldn’t even tell the difference between browsers.  Scrolling will occur on pc’s with low resolution levels.

An example might be like this:  Your site is built with 1000px Container.  Viewed in 800×600 resolution, some clipping will take place which will produce a scroll bar.

Stylesheets and Disabilities

The lower resolutions produce larger font, and in some cases, visitors have set Custom Controls to affect the stylesheets to get the larger font!  Don’t forget the hundreds of thousands of visitors with disabilities.  You can “listen” to your site through the Firefox browser.  This is a big reason to ensure your site offers image “alt” tags for adding a description instead of the image.  Take a listen to your website!  Again, in a perfect world, you have to be flexible.

Handhelds  and Print – Separate Stylesheets Are a Must!

When it comes to hand-held devices and great design, this is where a separate style sheet is a must.  The phone or device itself tells the browser what it is, and it will (the browser) pick up the alternative style sheet.  As a designer, you will need to know how to turn off large images and anything else that is not viewable by a small device.  At the same time, you have the capability to create a much simpler, readable, useable website that still has a good flow and ease of use by your visitors.

A well designed website should have these three stylesheets:
1.  For “all” types of media – again, good design should cover this, even if it looks a little different in the various browsers, resolutions, and monitor sizes that exist.
2.  A separate stylesheet for hand-held devices.  The site would look much different but should be designed with this in mind.  Flow is the key.  Larger images would disappear or made smaller, small ads can be resized larger, but the stylesheet still accesses the same information in the site.  Font size can be adjusted (font issues can happen – check out what your site looks like with just default font, too), JavaScript and Flash can get turned off – leaving a simplified version of your site & suitable for hand-held devices that don’t have mouse support.  Text ads work well on handhelds.
3.  Create a separate stylesheet in the event your visitor wants to print a page.  This would include changing color to black and white, change the font to serif and watch the font size, underline links, remove non-essential images, remove navigation, remove some or most of the advertising, remove JavaScript, Flash and animated images.

So as you can see, creating a great website is really about creating a great company and a great designer takes these things into consideration and will go to great lengths to ensure your site looks great on any device, functions 100%, is crafted with clean, validated code, and most importantly, a welcoming place for your visitors to find what they are looking for.

HTML5 – Getting ready for the future of the web

HTML5 is the newest edition of the language of the web with enhancements to a wide range of features including form control, API’s (Application Programming Interface), multimedia and structure. Many key players including Apple, Mozilla, Opera and Microsoft, together with the W3C are openly developing HTML5 and encourage web authors from all over the world to partake in the fun.  Microsoft and Adobe are contributing engineers to the HTML 5 standards development process, yet both remain noncommittal about adopting HTML5, at least while it is still in development.

HTML5 is a work in progress with the official standards release in 2014. And while the competition is heating up with Flash, companies are having developers build different versions of their website. One caters to the pc community with all of Flash’s rich capabilities and another designed for the hand-held device and its mind-boggling worldwide community and applications.

While you’re at it, make your site 508 compliant, like government sites, which cater to the millions of people with certain disabilities. Two small examples would be to add captioning to your videos and adding the text equivalent of audio must be provided, if only in transcript form. These are two very small examples. Websites should be built with well coded CSS external stylesheets. The ADA (Americans with Disabilities Act) is doing a great job helping people with certain disabilities. They are being equipped with screen readers giving them the ability to change the styling of your site for larger print. You do not want to interfere with their capabilities.

The HTML5 Tracker website openly discusses the ongoing phases of the development. The HTML5 validator is working very well.

Some changes include:

HTML5 adds many new syntax features including <video>, <audio> and <canvas> elements, as well as integration of SVG (scalable vector graphics) content, which are designed to improve the inclusion and handling of multimedia and graphic content on the web. Other elements such as <section>, <article>, <header> and <nav> are designed to improve the semantic richness of documents. New attributes have also been introduced, and others removed, to improve and simplify semantic expression. Some elements, such as <a>, <cite> and <menu> have been changed, redefined or standardized. The APIs and DOMare fundamental parts of the HTML5 specification. It also defines in some detail the required processing for invalid documents, so that syntax errors will be treated uniformly by all conforming browsers and other user agents. Replacing <divs> with distinct elements actually makes the source code easier to author. The header/footer elements may contain sub-headings.  The aside element is used for sidebars.  The article element is an independent section of a document page or site suitable for news or blog articles, forums, posts or individual comments.

Benefits of using HTML 5

  • Backwards compatible with existing browsers
  • Authors are familiar with the syntax, which is lenient and case insensitive
  • Shorthand syntax, e.g., authors can omit some tags and attribute values

Benefits of using XHTML

  • Strict XML syntax encourages authors to write well-formed markup
  • Integrates with XML vocabularies by conforming to xml syntax and can support most limited devices
  • Allows the use of XML processing used in editing and publishing processes

It is conventional to use XHTML rules and use all lowercase in HTML5.

Since HTML5 is mainly a well-defined HTML4/XHTML 1.0, and because both HTML- and XHTML-style syntax is allowed, you need to do very little (maybe only a doctype change) to change current well-made pages into HTML5.  It will probably look fine in most browsers, although, it might not validate as HTML5 without some tweaking, which is a learning curve. It is advisable for current web developers to stay informed of the revisions and learn HTML5.  It is being developed to support future prospects for media accessibility options and much more. Should developers and designers invest in HTML5?  HTML5, CSS and JavaScript are going to be the “classic three” for developers and designers.  A little Flash never hurt anyone, either.  I think Flash technology is going to be further enhanced and the fact that it performs the same in most browsers right now is great.  Of course, this isn’t currently the case for hand-held devices, but you can code your way out of just about anything.

As a web designer and developer, I am very excited to be part of a community working to refine a language spoken across browsers, can be viewed in various mediums, assists the blind, and can be encoded in every language. Not so simply amazing! January 22, 2011 Christina Descalzo
770-316-1654