(x)html code which does not form the page

Hi all,

Since I decided I would like to write some serious HTML code, I started to read some books but could not find the information I’m looking for, yeah… maybe I did not find so because my fault, but I would like to ask some help.

It happens hat there’s some code normally writed at the top of the html code like that one:

  1. xml version:
    EX: <?xml version= encoding= ?>

  2. Document type definition:

  3. xml atributes:
    <html xmlns=“http://www.w3.org/1999/xhtml

  4. HTML metatags:
    . meta names like: author, copyright, description, keywords, robots, googleboot
    . meta http equiv: cache-control, content-language, content-Type, expires, pragma,
    refresh
    . Something else maybe??

And I think that’s all, correct me if not please.

So that’s what’s annoying me, could you help me up about any book o good material to learn about so please?

Thank you

this indicates that you’re not using HTML but XML (XHTML is XML too). XML needs that heading right at the very beggining.

<?xml version=“1.0” encoding=“utf-8”>

DTD or Document Type Definition tells the browser which set of rules need to use to render the page. It can be a public DTD (like those created by W3C) or, if you use XML, you can create a private DTD (that’s your own, with your own rules and semantics)

This is mandatory when you use XHTML (because, let me insist, it is not the new version of HTML but XML). It sets the name space (xml namespace). Name spaces are used so if you have more than one specification and there is two elements with exactly the same names (such as to <paragraph> elements), the browser can know where are the rules to be applied because it will know to which name space belongs. (not sure if this is clear).

Meta tags are additional information for the web server (such as how often a page needs to be refreshed) and the search engines.

Lots, of course, you’re only scratching the surface of the header area!! :smiley:

SitePoint has lots of good books for different levels, but I would suggest that you start with HTML and not with XHTML. Internet Explorer does not support XHTML :frowning:

This is SitePoint’s book matrix.

Have a look at take your pick. My suggestion? If you need to start from the beggining, get “Build Your Own Web Site The Right Way Using HTML & CSS”

If any of the SitePoint books in the book matrix list interests you, I’d like to point out that most (if not all) books offer free sample pages for you to look at to give you an idea of it’s contents.

Also, along with the books that SitePoint offers, you may also want to look through SitePoint’s HTML Reference section…might also help clear up any questions you have. :slight_smile:

Cool!!!,

Thank you, good page the want you told me, I was thinking about starting with the html 4 for dummies book, but I’ll take a llok the ones you told me.

meta tags in the head are not compulsory things - it is not an error to miss them out.

Thank you, I was pretty worry about these things

Meta tags are not compulsory but they may be convenient.

Headers are compulsory though. Make sure that you don’t confuse headers with meta tags :wink:

When referring to META I assume you meant HTML 4.01 only, in which case it is not mandatory. Albeit please note typically when marked-up ‘character encoding’ is used for a standalone HTML document. It MUST be the first HTML Element that should appear directly after the opening HEAD tag.

For example the following via META (HTML 4.01) would be correct:

  <head>
    [B]<meta http-equiv="Content-Type" content=
    "text/html; charset=UTF-8">[/B]
    <title>
      Zombie Dave
    </title>
  </head>

Whereas this via META would be a incorrect example:

  <head>
    <title>
      Zombie Dave
    </title>
    <meta http-equiv="Content-Type" content=
    "text/html; charset=UTF-8">
  </head>

Remember, I am talking “Character Encoding” which can be applied via various methods:

Thanks!