What are Web Standards? A comprehensive explanation of what is comprised in the term
This article is also available in Brazilian-Portuguese and in Spanish.
The term Web Standards is featured prominently all over the web, in meetings with customers and amongst web developers in general. However, the problem is that people have different views on what it actually means and encompasses.
Therefore, I will try to explain my views on it and what most people actually mean when they refer to Web Standards.
There aren’t any Web Standards, only Recommendations
First, what you should know is that there doesn’t exist any actual Web Standards when it comes to many technologies. There are indeed standardizing organs, such as ISO standards and Ecma, but when most people say Web Standards they refer to the work of W3C.
The difference is that W3C doesn’t actually set standards, but instead recommendations. In their own words:
A W3C Recommendation is a specification or set of guidelines that, after extensive consensus-building, has received the endorsement of W3C Members and the Director. W3C recommends the wide deployment of its Recommendations.
What people mean with Web Standards
Foremost, Web Standards are used in reference to developing HTML/XHTML, although it is recommended to know that the work of W3C consist of many other Technical Reports and Publications. Usually, what the term Web Standards consists of are these areas:
- Valid HTML/XHTML code
- Semantically correct code
- Separation of content (HTML/XHTML), presentation (CSS) and interaction (JavaScript)
To some people, it means all of the above, and to others, just one of them. What is important to know, though, is that all three are crucial for developing a genuinely good web site.
Valid HTML/XHTML code
Let’s take it from the top: the number one thing people want when they ask for Web Standards is that the code in the web site should validate. For most people, this only means the HTML/XHTML code, but there are also tools to validate your CSS code. Basically, what validating your HTML/XHTML code means is that the code you have in your web page should be according to the definitions given by the doctype you have chosen for your document.
It is important to choose your doctype wisely, since it will affect how the HTML/XHTML code will be interpreted and what layout mode will be activated in different web browsers. By having valid code, you don’t have to rely on different web browser’s varying error-handling mechanisms, but instead it is meant to be rendered the same by all.
By validating your code, you are very well likely to find errors and attend to a number of layout problems you never thought would be related to the actual HTML/XHTML code. It will make it easier to identify potential errors, lead to faster web development and building a better ground for maintenance.
Read more about why you should validate your code
Tools for validating your code
There are a number of online validation tools as well as add-ons to different web browsers. Here are the most popular ones:
- W3C Markup Validation Service
- W3C CSS Validation Service
- WDG HTML Validator
- Firefox HTML Validator add-on
- Internet Explorer Developer Toolbar
Read more about doctypes
- Fix Your Site With the Right DOCTYPE!
- Activating the Right Layout Mode Using the Doctype Declaration
- W3C’s Recommended list of DTDs
Semantically correct code
Something that is often overlooked is the meaning of semantically correct code. The idea is that each element in a web page should have an element that matches its meaning and conveys its value and purpose. The basic explanation of this is to use proper elements depending on the context.
Code examples
This code is semantically poor
<div class="page-heading">Title of the page</div>
<div class="text-paragraph">
Some text explaining what this web
site is about, which is really a
complete paragraph of text
</div>
<a class="menu-item" href="/item-1">Menu item 1</a>
<a class="menu-item" href="/item-2">Menu item 2</a>
<a class="menu-item" href="/item-3">Menu item 3</a>
This code is semantically rich
<h1>Title of the page</h1>
<p>
Some text explaining what this web
site is about, which is really a
complete paragraph of text
</p>
<ul class="menu">
<li><a href="/item-1">Menu item 1</a></li>
<li><a href="/item-2">Menu item 2</a></li>
<li><a href="/item-3">Menu item 3</a></li>
</ul>
The guidelines and recommendations for good semantic code are pretty easy to follow. Just use heading elements (<h1>
– <h6>
) for different types of headings, paragraph elements (<p>
) for paragraphs of texts, and lists (<ul>
, <ol>
etc) for any kind of listing you might have, and so on.
This will help you to more easily find certain parts in a web page and it will dramatically decrease load time with less code, and at the same time strongly improve maintenance aspects of your web site. And, not to forget, it will help you with SEO, because semantic code will help Google and other search engines to properly understand and index every bit of your code, for maximum results.
Important to note is that proper semantics should never be confused with how it is being rendered. Elements will most definitely be rendered differently depending on the visiting web browser, but that is not the fault of the semantics; just differing web browser implementations. The solution to this is not to alter good semantic code, but instead accomplish a unified presentation through CSS.
Read more about semantics
Separation of content (HTML/XHTML), presentation (CSS) and interaction (JavaScript)
There are a number of reasons why it is vital for you to separate your HTML/XHTML, CSS and JavaScript code. They have very different purposes, and the approach to how to use them should be thought-through.
Main reasons for separation
- Performance: External files such as
.css
and.js
will be cached in the end user’s web browser after the first load, hence dramatically decreasing load times and improving the experience. - Overview: You know where to look for and place code, each layer for its own purpose.
- Reusability: You can easily reference code and re-use it across the entire web site.
- Maintenance: You have all the code in one central location, applying all presentation and interaction code to all the web pages within a web site.
Read more about separation of HTML/XHTML, CSS and JavaScript
What about accessibility?
A very common misconception is that a lot of extra work will have to go into making a web site more accessible. The thing is, by ensuring you live up to the three categories mentioned in this article, you have come a very far way in making a web site accessible.
Valid code, especially with a strict doctype, will help you find content errors and non-existing alternate texts. Good semantic code will make it easier for any assistive device, or plainly just viewing the web page without CSS, much easier and understandable.
And, by separating interaction code (JavaScript) from the HTML/XHTML code, the web site will work without JavaScript if it is built on a solid ground. Then, naturally, you can progressively enhance the web site experience by adding a JavaScript layer, but a web site should never be fully dependent on it for the basic parts to work.
Read more about accessibility
Where to go from here
Below I’ve gathered a list of resources for learning more about following the Web Standards established above:
[…] NekÄÂdi reÄÂli web standarti neeksistÄ“, ir tikai rekomendÄÂcijas! PaÅ¡i saprotat, ka tÄ ir ironija, taÄÂu tiem, kuri ar webizstrÄÂdes standartiem iepazÄ«stas tikai tagad, noderÄ«gs bÅ«s Roberta raksts “What are Web Standards? A comprehensive explanation of what is comprised in the term“. […]
Very nice article and good explanation of Web Standards. Sometimes we forget that these are only recommendations. Only wish the software (browser) developers were as consistent as most designers.
Robert, you've got a typo in your semantic markup example: the first line currently reads
<code><ul class="menu">Menu item 1</code>
when it should be just
<code><ul class="menu"></code>
[…] Here’s your answer! Sharing is good! […]
Good definition to Web Standards!
I think people must know more about semantic…
Valid codes doesn't mean that your site's is correctly developed.
The Bespeckled SEO,
Thank you!
Nick,
Thanks, my bad. It has now been corrected.
Carlos,
Absolutely, solely validness isn't necessarily good.
[…] artÃÂculo con una explicación muy clara de todo lo comprende el término Web Standrads. Primero que nada, […]
great article !
do you mind if I use it to write some kind of introduction to web standards in french for some colleagues at work. It strictly won't be a translation, more an adaptation. maybe it'll be on my blog too. (I will link you back, of course)
engy,
No problem, that sounds fine with me!
If you want to translate it into French and publish it in your blog would be nice. 🙂
Good explanation. I’m going to use this as a reference for people.
Robert — Hope you are well.
Thanks for the article, and I'll also use it as a reference.
On a similar topic, I thought you might be interested in a presentation I did recently at a Refresh Miami meeting: http://webstandardsforskeptics.com/
Kris,
Thank you!
Michael,
I hope you're well too; it's been a while!
Thanks for the link!
[…] What are Web Standards? – a comprehensive explanation of what is comprised in the term […]
[…] “There aren’t any Web Standards, only Recommendations.” (“There is no spoon” ) Spread the word! […]
[…] What are Web Standards? – a comprehensive explanation of what is comprised in the term […]
[…] comprehensive explanation of what is comprised in the term and what not. At the end of the article, a list of resources for […]
[…] meus feed’s no Google Reader vi um artigo legal. Ele aborda tudo que pode se fazer com a propriedade background. Todos os atributos que podem ser […]
[…] Read this article for all the details you’ll ever need on the subject. 0 Comments posted on “What is meant by Sematically Correct Markup?” Post a comment […]
[…] Read this article for a good discussion on the topic. 0 Comments posted on “What are Web Standards?” Post a comment […]
[…] Full article here. 0 Comments posted on “Separation of content from presentation” Post a comment […]
[…] More… […]
Wow!! This is a great article about web standards. For sure, these are recommendations THOUGH I would think that it would be great if they were adopted by all web browser authors.
[…] What are Web Standards? A comprehensive explanation of what is comprised in the term […]
Hi Robert, great article!
Thanks for writing it, it is a great explanation about web standards. It could save me hours of reading some time ago.
I wanted to ask your permission to translate this article into spanish and republish it, referencing you as the author and linking to this page, of course.
Please let me know if that's fine.
thanks!
A great article on Web Standards, saying what a growing minority have been screaming for years, Web accessibility is easy if you follow standards!!.
I have recently started a blog and It took me about 15 minutes to go through wordpress and make it semantically correct, although unfortunately a few sidebar features had to be removed until I can find time to recode them.
Again ,well done on a great article!
Enjoying your holiday?
I'll send my new HTML / CSS students to this page when I start my latest job next week. It pulls a lot of other links together into one shorter easier to comprehend version. Great.
I think I originally read this in May… 🙂
great article about web standards…thank you
[…] What Are Web Standards? […]
[…] What are Web Standards? – a comprehensive explanation of what is comprised in the term […]
[…] web standards” would reveal that yours truly is the first blogger on the list with my article What Are Web Standards? A Comprehensive Explanation Of What Is Comprised In The Term. So why the hell wasn’t I asked? Instead they asked people like some Swedish has-been in […]
[…] The other thing I would like for you to see are web standards, what they are and why they are important. Because of everyones different interpretation of web standards, it has been said that there are no web standards, but just recommendations. For example, you need a “valid HTML/XHTML, semantically correct code, and the seperation of content, presentation, and interaction.” -Source […]
[…] Standards What are web standards About Web Standards The Web Standards […]
[…] http://www.robertnyman.com/2007/05/21/what-are-web-standards-a-comprehensive-explanation-of-what-is-… […]
[…] a semantic web, separation of content (HTML), presentation (CSS) and interaction (JavaScript), and web standards started its journey to becoming the lingua franca of more aware interface […]
[…] a semantic web, separation of content (HTML), presentation (CSS) and interaction (JavaScript), and web standards started its journey to becoming the lingua franca of more aware interface […]
[…] a semantic web, separation of content (HTML), presentation (CSS) and interaction (JavaScript), and web standards started its journey to becoming the lingua franca of more aware interface […]
[…] What are Web Standards? A Comprehensive Explanation of What is Comprised in The Term by Robert Nyman […]
The web standards are used to design a website, which comprised of a web site designing tools and web development tools. These tools are helpful to designing and developing websites.
[…] Once you are familiar with the syntax and everything, you might want to move one step ahead by validating you works to meet the web standards. What are web standards? Read about it here. […]
[…] What Are Web Standards? A Comprehensive Explanation of What is Comprised in the Term from Robert’s Talk […]
[…] What Are Web Standards? A Comprehensive Explanation of What is Comprised in the Term from Robert’s Talk […]
[…] What are Web Standards: A comprehensive explanation of what is comprised in the term […]
Web standards are good sometimes and helps minimize bad coding habits
[…] What Are Web Standards? A Comprehensive Explanation of What is Comprised in the Term posted under Week 03 […]
[…] What Are Web Standards? A Comprehensive Explanation of What is Comprised in the Term – Robert’s Talk […]
I think web standards are very important. Some sites do not check their standards using the basic tool. Alot of the time this will fix or highlight broken links and problem areas in the site. Great post as I believe more people should know about web standards.
[…] What Are Web Standards? A Comprehensive Explanation of What is Comprised in the Term from Robert’s Talk […]
Very good article and nice explanation of Web Standards. Sometimes we forget that these are only recommendations
[…] What Are Web Standards? A Comprehensive Explanation of What is Comprised in the Term from Robert’s Talk […]
[…] http://robertnyman.com/2007/05/21/what-are-web-standards-a-comprehensive-explanation-of-what-is-comp… […]
[…] is structured and presented on the web. You can find a good explanation of what web standards are here and read why they are so important in this article. Do not use an HTML editor to learn the basics, […]
[…] http://robertnyman.com/2007/05/21/what-are-web-standards-a-comprehensive-explanation-of-what-is-comp… […]
Are web standards going to be ever changing?
Brilliant article. My top reason for writing sites to a web standard is for the cross-browser compatibility. Many people make huge mistakes when they code their websites by not going back to the site to review it for mistakes on the HTML code. Validation is incredibly easy to fix and the validator at W3C even have a setting to copy and paste the correct code! No excuses.
Iain Mars,
Thanks, and I agree!
[…] who has some great insights on web development, usability, standards, and JavaScript, published What are Web Standards? A comprehensive explanation of what is comprised in the term. Robert discusses the main areas of web standards, providing details and links for each of the […]