educational

HTML5: Towards a More Semantic Web

HTML5 is all the rage these days. If you stumble upon a group of nerds you’ll hear phrases like “offline storage”, “microdata” and “improved error handling”. But what does HTML5 mean to the average webmaster —the webmaster who just wants to display their content in the best way possible and not worry too much about the technical mumbo-jumbo which makes nerds’ trousers tight? In a nutshell, HTML5 provides a vastly expanded array of tags which allows for webmasters to describe what their content is and how it’s related right in the content itself.

Before embarking on the usage of HTML5, however, a brief aside regarding CSS 3 and JavaScript is required. Many of the “wow factor” HTML5 demonstrations floating around the web are primarily implemented in CSS 3 and the newest version of JavaScript. While these demos are impressive, they’re irrelevant to the semantic power of HTML5. A valid, useful and powerful website can be completely built in pure HTML5 without writing a single line of JavaScript or CSS.

In order to understand a little more what HTML5 will mean for you, it’s important to understand where it has come from and what, exactly it is. At the moment HTML5 is simply a proposal. HTML5 is a proposal which every major browser (including Internet Explorer 8+) supports to a lesser or greater extent, but, it is still just a proposal. The proposal status of HTML5 has lead some in web circles to proclaim that HTML5 isn’t quite ready to use yet. Fortunately, HTML5 is defined in such a way that content will still display properly in browsers which don’t yet implement all of the HTML5 specific features, providing a clean, simple upgrade path for webmaster.

HTML5 has something of a troubled history. In the mid-2000s it became obvious that the current version of HTML (4.x) simply did not provide the richness of features required for the next generation of website. To address this the World Wide Web Consortium (W3C) (the organization in charge of creating web standards) started creating a new standard based on very strictly defined eXtensible Markup Language (XML) called XHTML. If you happen to be a fetishist for code purity and have a PhD in the theory of programming languages, then XHTML is for you. For everyone else, XHTML was a disaster. It added a tremendous amount of complexity to creating even a simple web page, yet failed to provide useful features for most everyday web tasks.

In response to the debacle that was XHTML, a group comprised largely of web designers and people at Mozilla (creators of Firefox) began imagining their own standard. Instead of strict adherence to abstract programming concepts it would be based around the relatively simple HTML4 syntax and focus on adding useful elements to make it easy for designer to create sites which clearly identified what each portion of the site meant, not just how it looked. That project is what we now call HTML5.

To the academic programmer, steeped in the hierarchy of working groups and interminable committee processes an independent proposal, such as HTML5 is tantamount to hearsay, and HTML5 meet with lots of resistance. One form of this is the oft repeated fib that HTML5 will not be ready until 2022. Not so, I’m happy to say. 2022 represents the expected date by which there will be two complete browsers which have implemented every feature in HTML and have test code written for each of those features. That’s over 20,000(!) tests. Understandably, this will take some time. Most of the “core” features in HTML5 are already implemented in all the major browsers.

Enough history! What does HTML5 actually do? In a nutshell it provides a series of new tags which identify to browsers, robots and programs of all stripe what a particular piece of content means. Consider the example of the top navigation menu on a website. In HTML4 this is typically implemented as a series of divs, or possibly a table (gasp!).

These elements suffice to contain the content, but they do not convey the meaning of the content. In HTML5, on the other hand, you would wrap this navigation element in a nav tag. The nav tag indicates that these elements are not just a random collection of links on on your site, but rather, represent a logical unit of navigational data. Spiders, like Google and Yahoo can use this fact to understand the logical structure of the website. Tools can be written which automatically check your site for consistency and unnecessary (or broken) navigation elements. And browsers can provide tools to help user browse deeper into the site — opening each main nav link in a new tab automatically, for instance.

In addition to the nav tag, there are HTML5 tags for sections, articles, headers, addresses, asides and a host of other meaningful elements on the page. Each of these elements provides a way to create content which carries it purpose and meaning along with it. These core semantic markup elements are fully supported in Firefox and Chrome (and Opera, if anyone cares). Which brings us to Internet Explorer.

Internet Explorer has long been the problem child of web development. IE unfaithfully butchers most content and and has caused many a designer to swear a personal fatwa against the entire Redmond team. Fortunately, there’s a cure.

A free JavaScript library exists called Modernizr [https://www.modernizr.com/]. By simply including the modernizr.js file in the head of your web page Internet Explorer 6+ will properly interpret all of the common HTML5 markup tags, so your nav still provides navigation in IE.

HTML5 finally brings to web pages a robust mechanism for providing context and meaning along with their content. It’s supported anywhere. With the simple expedient of adding one or two tags to your existing pages you can say “HTML5? Of course I’m using it!”

Related:  

Copyright © 2024 Adnet Media. All Rights Reserved. XBIZ is a trademark of Adnet Media.
Reproduction in whole or in part in any form or medium without express written permission is prohibited.

More Articles

opinion

Best Practices for Payment Gateway Security

Securing digital payment transactions is critical for all businesses, but especially those in high-risk industries. Payment gateways are a core component of the digital payment ecosystem, and therefore must follow best practices to keep customer data safe.

Jonathan Corona ·
opinion

Ready for New Visa Acquirer Changes?

Next spring, Visa will roll out the U.S. version of its new Visa Acquirer Monitoring Program (VAMP), which goes into effect April 1, 2025. This follows Visa Europe, which rolled out VAMP back in June. VAMP charts a new path for acquirers to manage fraud and chargeback ratios.

Cathy Beardsley ·
opinion

How to Halt Hackers as Fraud Attacks Rise

For hackers, it’s often a game of trial and error. Bad actors will perform enumeration and account testing, repeating the same test on a system to look for vulnerabilities — and if you are not equipped with the proper tools, your merchant account could be the next target.

Cathy Beardsley ·
profile

VerifyMy Seeks to Provide Frictionless Online Safety, Compliance Solutions

Before founding VerifyMy, Ryan Shaw was simply looking for an age verification solution for his previous business. The ones he found, however, were too expensive, too difficult to integrate with, or failed to take into account the needs of either the businesses implementing them or the end users who would be required to interact with them.

Alejandro Freixes ·
opinion

How Adult Website Operators Can Cash in on the 'Interchange' Class Action

The Payment Card Interchange Fee Settlement resulted from a landmark antitrust lawsuit involving Visa, Mastercard and several major banks. The case centered around the interchange fees charged to merchants for processing credit and debit card transactions. These fees are set by card networks and are paid by merchants to the banks that issue the cards.

Jonathan Corona ·
opinion

It's Time to Rock the Vote and Make Your Voice Heard

When I worked to defeat California’s Proposition 60 in 2016, our opposition campaign was outspent nearly 10 to 1. Nevertheless, our community came together and garnered enough support and awareness to defeat that harmful, misguided piece of proposed legislation — by more than a million votes.

Siouxsie Q ·
opinion

Staying Compliant to Avoid the Takedown Shakedown

Dealing with complaints is an everyday part of doing business — and a crucial one, since not dealing with them properly can haunt your business in multiple ways. Card brand regulations require every merchant doing business online to have in place a complaint process for reporting content that may be illegal or that violates the card brand rules.

Cathy Beardsley ·
profile

WIA Profile: Patricia Ucros

Born in Bogota, Colombia, Ucros graduated from college with a degree in education. She spent three years teaching third grade, which she enjoyed a lot, before heeding her father’s advice and moving to South Florida.

Women In Adult ·
opinion

Creating Payment Redundancies to Maximize Payout Uptime

During the global CrowdStrike outage that took place toward the end of July, a flawed software update brought air travel and electronic commerce to a grinding halt worldwide. This dramatically underscores the importance of having a backup plan in place for critical infrastructure.

Jonathan Corona ·
opinion

The Need for Minimal Friction in Age Verification Technology

In the adult sector, robust age assurance, comprised of age verification and age estimation methods, is critical to ensuring legal compliance with ever-evolving regulations, safeguarding minors from inappropriate content and protecting the privacy of adults wishing to view adult content.

Gavin Worrall ·
Show More