HTML5 – The basics


The whole world is moving towards HTML5 and so are we. Here is a brief introduction to get you started with HTML5.

The Doctype tag: The <!DOCTYPE> tag should be the first tag in your HTML document even before <html>. It tells the web browser about what version of the markup language the page is written in. In previous versions of HTML, there were several possible declarations for the DOCTYPE but in HTML5, there is only one.

<!DOCTYPE html>

The root element for any HTML document starts with the <HTML> tag. The content of this document should have a HEAD element followed by a BODY element.

Sample Code:

<!DOCTYPE html>
<html lang=”en”>
<head>
<title>Test<title>
</head>
<body>
</body>
</html>

Although it is not mandatory to specify the language of the document using the lang tag, it is recommended to specify the primary language.

Some of the new features in HTML5 that’s getting web developers excited about are:

1> Full CSS3 Support
2> Video and Audio using the <audio> and <video> tags.
3> 2D/3D graphics. The <canvas> element is used to draw 2D graphics.
4> Local storage
5> Local SQL database
6> New tags/attributes including but not limited to <header>, <footer>, <section> etc

The other cool thing is that HTML5 introduces new form input elements on which you can specify an input type. By doing this, the browser will take care of validations and even formatting the field data. Some of the new input types include telephone number, email, URL, date and time.

0 comments ↓

There are no comments yet...Kick things off by filling out the form below.

Leave a Comment