Hello, dp member, What is the difference of the two groups of html code ? <meta name="keywords" content="search engine marketing" /> <link rel="stylesheet" type="text/css" href="images/style.css" /> <br /> <meta name="keywords" content="search engine marketing"> <link rel="stylesheet" type="text/css" href="images/style.css"> <br> PS. I already know the answer . I would like to ask dp member to answer it bcoz if I reveal the answer at first, it would become a meaningless "copy+paste" thread . If I don't reveal the answer at first, it would be a good way to study something about html/css . Feel free to comment, my dear DPers .
In the first one the tags aren't closed and in the second one they are, representing the requirements of XHTML and HTML respectively
Good job ! You reveal the answer . Xhtml has more strcit code requirement than html coed . It require begin tag and close tag . For the tags that don't have close tag, it must end with slash. (it is the same to the close tag. Just like some examples above. Some other tag like <img src="images/logo.gif" /> and so on)
I would like to share some css knowledge with dp member . But I don't like the "copy and paste" threads . I would like to say it with examples , it is easy to remember . Don't you think so ? The second purpose is to quiz the dp members .
Not quite true. You are comparing two different dialects. Each has ts own syntax, or grammar. Neither is more or less strict than the other—they're just different. cheers, gary
Buddy, you are wrong . I had started a thread about the difference of document type declaration here . http://forums.digitalpoint.com/showthread.php?t=936660 The same (x)html markup and css code display differently in the same browser, if the document type are different . You should know that . So the document type declaration is easy to ignore by web developers but very important ! There are still many people who can't tell out the difference of different document type . Learning by example is good way of study . Don't you think so ?
the first code is XHTMl(adavanced version of HTML) ,the set of code is HTML.the html code requires a close tag without that it may not work