1-866-363-5633
www. Expression - Web - Tutorial .com


Expression Web 4 Tutorials:  Building Web Sites with CSS & HTML  ~  One Step at a Time


Expression Web 4 & HTML 5  - A New Version of HTML & XHTML

HTML 5 is slated to replace HTML 4 and XHTML 1.0 by sometime in 2012.  In other words, HTML 5 will become a Web Standard (Web Recommendation) in 2012.

However, you will notice that Expression Web 4 now has a Doctype for HTML5.  Yet, you won't find a single word about it the Expression Web 4 User Guide (found in the help menu).  [Come'n Microsoft!! Tell us about it!]

Here's what I have found....

I have only just begun to toy with HTML 5 in Expression Web 4, so I am sure I will have many observations to share with you.  But here is what I do know by working with this new Doctype:

  • 1.  To use the HTML 5 Doctype, Click Tools - Choose Page Editor Options -- Choose the Authoring Tab.  Look at the drop down menu under "Doctype & Secondary Shema" as shown below.  Choose a Doctype and then set the Secondary Schema so that it matches the Doctype.
  •  
  • doctype html 5
  • Setting the Doctype
  •  
  • setting the Doctype Expression Web 4
  • Various Doctypes to Choose From

With HTML5, there is only one Doctype to choose from.  This will drastically simplify things.  And, you can begin using the HTML5 Doctype right now.

 

  • 2.  HTML 5 Doctype is written as follows:   <! DOCTYPE html>
  •  
  • Note:  the html tag can be written as <html lang="en">  which specifies the language as English.  However, Expression Web will indicate the language as follows:
  • <meta content="en-us" http-equiv="Content-Language">
  • To choose the Language of the Document, open a web page in EW's main editing window.  Click File and choose Properties.  Click on the Language Tab and set the Language.  Doing this will create the meta tag above.
 <! DOCTYPE html>
<html>
<head>
   <title></title>
</head>

<body>
</body>

</html>

 

  • 4.  What's different when using the HTML 5 Doctype?   Well, so far not very much.  I went through a web site I have half built and changed the Doctype on all pages to HTML 5 and the only errors that I got at that time were related to the closing slashes of empty elements (elements that do not have a closing tag).  So, I had to simply remove the closing slashes from the <br /> tags and other elements.  Once I removed all the closing slashes and the extra space, the errors were removed. 

Update:  Some New Content!

 

Update:  Here I am adding some new content about HTML 5.  I've finally set aside some time to explore HTML 5 a bit more. 

More Specifics about the HTML 5 Doctype

According to the HTML 5 Specification, the only purpose of the Doctype in HTML 5 is to ensure the web browsers will render your pages in Standards Mode.

Always specify a Doctype. 

The Doctype must be on the very first line of your page (in code view).  Don't skip a line and never leave the Doctype unspecified.

However, be aware that the Doctype also drives the notification of Errors and Incompatibilities within the mark-up of your web pages.  In other words, when validating your pages, the HTML code is compared against the Doctype in order to determine if any errors exist.  This still holds true.

New HTML5 Elements

I have more info for everyone.  Keep reading to find out more about the new Structural and Semantic Elements in HTML5.....next