Sunday, November 10, 2013

History of Computer Science: HTML5

HTML5 is very popular nowadays in the web development community. But, before introducing about HTML5, I would like to talk a little bit about its history. Berners-Lee wrote the first HTML page in 1989. For its first five years between 1990 – 1995, it went through a number of revisions and extensions, primarily hosted first at CERN and then at the IETF. Berners-Lee found the W3C to standardize HTML for all browsers to follow. HTML started small and got bigger. In 1995, HTML 2 and 3 were released then made way to a more pragmatic approach known as HTML 3.2, which was completed in 1997 by W3C. HTML 4.0 quickly followed later that same year. In 1999, HTML 4.01 came out.

The following year, the W3C membership decided to stop evolving HTML and instead begin work on a XML-based equivalent, called XHTML. This effort started with a reformulation of HTML4 in XML, known as XHTML 1.0, which was completed in 2000.

In 2004, the idea that HTML's evolution should be reopened was tested at W3C. Mozilla and Opera presented the early draft proposal covering just forms-related features and some principles that underlie the HTML5, but the proposal was rejected. And W3C membership wanted to continue developing XML-based.

Browser developers got frustrated with W3C progress and created a new standard committee to write the HTML5 specification. Shortly after that, Mozilla, Apple, and Opera jointly announced their intent to continue working under a new venue called the WHATWG. In 2006, the W3C expressed an interest to participate in the development of HTML5 after all. And in 2007, W3 formed a working group chartered to work with the WHATWG on the development of the HTML5 specification, which added:
  • Form input type
  • Audio/video
  • Data storage
  • 2d/3d Graphics
  • Drag-and-drop
  • and much more


The HTML 5 DOCTYPY is now the most common, used on over 40% of pages.

DOCTYPE is a piece of HTML code that says which version of HTML is being used at the top of the HTML page. For example,

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> // HTML 4.01 declaration
<!DOCTYPE html> // HTML5 declaration

Since different browsers support different audio/video formats, HTML5 lets us specify multiple sources for the audio/video elements, so browsers can use the format that works for them.
For example, below is how we code in HTML5. Very simple and clean, isn't it?

<!DOCTYPE HTML>
<html>
<body>

<video width="320" height="240" controls>

  <source src="movie.mp4" type="video/mp4">
  <source src="movie.ogg" type="video/ogg">
  Your browser does not support the video tag.
</video>

</body>

</html>

<!-- Old HTML version for one kind of video -->
<object width="420" height="360" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab">
   <param name="src" value="movie.mp4">
   <param name="controller" value="true">
</object>

No comments:

Post a Comment