Quote:
Originally Posted by L96
Erm, I hope not, because I'm just typing away in Notepad.
Gibberish:
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
It doesn't have spaces in it, if I don't put them in though, the whole thing vanishes when I hit post.
In the meantime, I've found a heap more learners places, some say I need that gibberish for something called CSS later (whatever the hell that is, and I haven't got that far and I'm not planning to until I have this bit right), and some sites say not to bother.
Which group are lying to me?
Thank you, Chris. 
|
The "DOCTYPE" line tells the browser, what DTD (=Document Type Definition) the current page is using. In a nutshell, the DTD instructs the browser how to display certain tags in the code. Look here:
http://www.w3.org/QA/2002/04/valid-dtd-list.html and here:
http://www.w3.org/QA/Tips/Doctype
Quote:
Originally Posted by mszee
I am sure Chris will reply to you better but let me see what sense I make out of this and no, you don't need to understand it in order to use it...but this is a header in HTML that browser might use it to validate that it's valid HTML and valid web page.
The string of gibberish tells your editor that the file you're editing is an HTML file and gives it enough information to validate it if it wants to.
CSS is Cascading Style Sheets and although not really complicated will take a little more explanation. If you're writing a lot of similar web pages CSS helps you keep them looking and feel the same way without typing pages and pages of the same code. To make this simple you save certain often used tags in a separate page with .css ending and refer to it in your html page.
And that's how far my knowledge goes and no further...sorry...the rest will have to wait for Chris.
|
CSS are basically used to separate
style elements (colours, fonts, ...) from
content elements (HTML, XHTML, ...). For example, with the exception of
Black & Gold, all different themes on this site are basically nothing more than different style sheets.