user990635
user990635

Reputation: 4269

How to start using html5?

It might be an obvious question, but I was wondering how do you start using new technology?
I saw all the new tags etc. but probably if I'll just start using it, it won't recognize it.
Do I need to install something/ define something/ etc to be able to start using it? how will visual studio know it's html5?

All the guides concentrate of how to use the tags and syntax inside html5, but not how to enable it...

Upvotes: 0

Views: 2626

Answers (4)

Talha
Talha

Reputation: 19282

To start html5

the html5 doctype is

<!DOCTYPE html>

When you use the new HTML5 DOCTYPE, it triggers browsers to render the page in standards compliant mode.

Standards-compliant mode

  • In standards-compliant mode, the web browser assumes the page has been authored to the web content specification declared; code that does not conform to the declared standard may not display, or may display incorrectly.
  • For a web browser’s standards-compliant mode to be triggered, the webpage must have a complete document type declaration, including the URI to the document type definition (DTD).
  • There is typically less variation in webpage display between different browsers when standards-compliant mode is triggered, as the same centralised W3C specification is used as a reference when creating the web browser software.

Courtesy this link

Learn more about HTML5, Click on this link and read articles....

Upvotes: 1

Mike Deck
Mike Deck

Reputation: 18397

First of all you need to understand what HTML is. HTML is a markup language used to define documents which can then be rendered visually to a user. This rendering is generally done by a web browser. Because of this, if you're producing HTML documents using the new tags introduced in HTML5 it's really up to the people consuming those documents to have a browser capable of rendering the new standard.

Luckily HTML5 was designed to be backwards compatible with almost all of the browsers currently in use. That means that with a few exceptions, publishing valid HTML5 markup using the new semantic tags will generally be viewable by all of your users. Some of the more advanced aspects such as the canvas element won't work in older browsers, and you will definitely need to do more extensive research into cross-browser compatibly issues before publishing a production site. But if you're just looking to get started, as long as you have a recent version of your favorite browser installed locally to test with you should be fine.

The one thing you will need to do is make sure you include the correct doctype statement at the beginning of the document. This is the first thing the browser reads and it tells the browser what format to expect the rest of the document to be in. The very first line of your HTML5 document should have the following code:

<!doctype html>

For further reference about how to setup an HTML5 page as well as the history of the spec I'd recommend reading Dive into HTML5 available freely online at the hyperlinked address.

Upvotes: 0

eivers88
eivers88

Reputation: 6247

This is all you need to start a blank html5 document:

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>

<body>
</body>
</html>

I highly recommend also using an html5 shiv http://code.google.com/p/html5shiv/ so that your page will degrade nicely in older browsers.

Upvotes: 5

U.P
U.P

Reputation: 7442

Newer Browsers support HTML 5 (Chrome, Firefox, IE9, Opera, etc). Your starting point is

<!DOCTYPE html>

and that's it.

Upvotes: 1

Related Questions