About HTML5 Tags

Not all web browsers on the Internet today support HTML5. Focus on what’s possible in the Safari web browser on the iPhone, iPad, and iPod. If you’re creating web pages for the broad audience of the World Wide Web, you should test your work in all the most popular browsers.


Have fun exploring the new tags in HTML5, even those that are still new and not fully approved. When designing web pages for clients, still use many of the tried and true HTML tags from the still popular XHTML.


Starting with the doctype tag


The doctype, which tells a browser how to interpret the HTML code in a web page, is one of the most significant changes in HTML5. In HTML4, web authors had to identify the version of HTML by including a link to the Document Type Definition. You may be familiar with the longer doctype used for a page created with XHTML 1.0, which looks like this:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

No more! In HTML5, the simple <!DOCTYPE html> is all you need at the top of your code. When you see this doctype in a web page, it’s the first clear indicator that the page was created using the latest version of HTML.


Creating valid <html> tags


The next line of your website’s HTML Framework consists of the <html> tag, which opens the HTML document and specifies what language (spoken language, not computer language) the page uses.


Why identify the language?



  • The W3C asks you to specify the language. According to the W3C recommendation, you should declare the primary language for each web page with the lang attribute inside the <html> tag.



  • Specifying a language makes your page accessible to people who use screen-reader software. Screen-reader software (such as JAWS) needs to know what language your pages are written in so it can pronounce your words properly.



  • Search engine optimization is improved. You reap SEO benefits if you’re writing in English — and also if you’re writing in some other language.


    According to the Google Zeitgeist, 50 percent of Google users search in languages other than English, and many of these users set their Google preferences to search only for pages in specific languages. Google's language autodetection algorithms are better than most, but why make Google's job more difficult?






dummies

Source:http://www.dummies.com/how-to/content/about-html5-tags.html

No comments:

Post a Comment