O'Reilly Forums: Chapter 7 Question Doc Type,meta Tag, Html Tag - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Chapter 7 Question Doc Type,meta Tag, Html Tag

#1 User is offline   coolcat 

  • New Member
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 25-November 12

Posted 25 November 2012 - 01:47 PM

QUESTION FROM 1ST EDITION BOOK
Our book uses this style of doctype, html tag, and meta tag for chapter 7-but posted below this is what is used as template for XHTML 1.0 on W3C website. The WC3 website uses a different Meta tag set up and adds lang="en" xml:lang="en" at end of html tag . Do you recommend setting up Meta tag like it is done in book or like it is done on WC3 website?

THE WAY DONE IN BOOK

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>blank</title>
</head>
<body

TEMPLATE WC3 website.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>An XHTML 1.0 Strict standard template</title>
<meta http-equiv="content-type"
content="text/html;charset=utf-8" />
</head>

<body>

<p>… Your HTML content here …</p>

</body>
</html>

This post has been edited by coolcat: 25 November 2012 - 02:16 PM

0

#2 User is offline   Beth Robson 

  • Advanced Member
  • PipPipPipPipPipPipPipPip
  • Group: O'Reilly Employee
  • Posts: 320
  • Joined: 17-September 08
  • Gender:Female
  • Location:Seattle, WA
  • Interests:I am interested in computer science, the Web, social media and the internet, Mac development, and adult learning.

Posted 27 November 2012 - 05:35 PM

Sure, if you need your document to be strict XHTML (XML) then you should add those extra attributes. If you're just using the page as a web page in the browser with no need for XML processing then it's optional and up to you.
Elisabeth Robson
Co-founder, WickedlySmart.com
Author: Head First HTML5 Programming, Head First HTML and CSS, Head First Design Patterns
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users