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:
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!!
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
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.
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: