PrateekSaxena Posted February 22, 2007 Share Posted February 22, 2007 I think all of us here are aware of the Simple Quiz that was started by an Cederholm. I thought it would be nice to get the same questions here and have a discussion on the questions. The moderators can give the final verdict for each question. So if I have the permission from the moderators I will soon post the first question! Link to comment Share on other sites More sharing options...
aspnetguy Posted February 22, 2007 Share Posted February 22, 2007 I am unfamiliar with that quiz Link to comment Share on other sites More sharing options...
Jonas Posted February 22, 2007 Share Posted February 22, 2007 Me too. Link explaining?EDIT: Ah, never mind, I googled it a bit. Sure, looks ok. Fire away. Link to comment Share on other sites More sharing options...
PrateekSaxena Posted February 22, 2007 Author Share Posted February 22, 2007 (edited) here is an example - <<snip, snip>> Edited February 22, 2007 by Jonas Removed link, figure it is best if as few people as possible see the point beforehand. Link to comment Share on other sites More sharing options...
PrateekSaxena Posted February 22, 2007 Author Share Posted February 22, 2007 So shall we start?@Jonas or aspnetguy: Please post the first question from the link!! Link to comment Share on other sites More sharing options...
aspnetguy Posted February 22, 2007 Share Posted February 22, 2007 I say go for it Link to comment Share on other sites More sharing options...
PrateekSaxena Posted February 22, 2007 Author Share Posted February 22, 2007 Q: Which of the following is more semantically correct? (For the title of a document) 1. <span class="title">This is a Title</span> 2. <h1>This is a Title</h1> 3. <p><b>This is a Title</b></p>So here goes… the first one is a doozy. Sure it’s incredbly obvious — but we have to start somewhere, and should probably make no assumptions.Start Answering !!!!! Link to comment Share on other sites More sharing options...
roondog Posted February 22, 2007 Share Posted February 22, 2007 Surely the title would go in the <title>tags. But I think I'll go for number 2. Link to comment Share on other sites More sharing options...
Jonas Posted February 22, 2007 Share Posted February 22, 2007 Assuming we're talking current standards, number two. However, for xhtml 2.0, h1 is deprecated, in which case I'd go for number one. Link to comment Share on other sites More sharing options...
pulpfiction Posted February 22, 2007 Share Posted February 22, 2007 Should there be another option, <title>....... does title mean page content title?anyways out of the given options 2. <h1>This is a Title</h1> looks more semantically correct...... Link to comment Share on other sites More sharing options...
PrateekSaxena Posted February 22, 2007 Author Share Posted February 22, 2007 I did not know that even <H1> was deprecated in xhtml2.0 all my pages are xhtml 1.0 Strict Validated...I have never used <SPAN> in my whole life...I dont even know its use ) Link to comment Share on other sites More sharing options...
aspnetguy Posted February 22, 2007 Share Posted February 22, 2007 #2...span is used to wrap inline elements (ie apply a class to a section of text) <p>This is some text but this <span style="color:red">word</span> is red</p> Well unless Google changes there page ranking system (which relies heavily on <h> tags then I won't be using XHTML2. Although Google seems to keep up with things like that. Link to comment Share on other sites More sharing options...
roondog Posted February 22, 2007 Share Posted February 22, 2007 As far as I am aware <span> is used for styling sections of text. Where a <div> contains text and images other divs etc. span is for text only. e.g if you want part of a paragraph to have a different style you use <span>. I'm sure someone else will correct me on that. Link to comment Share on other sites More sharing options...
PrateekSaxena Posted February 22, 2007 Author Share Posted February 22, 2007 why cant we use <P> for the same? Link to comment Share on other sites More sharing options...
aspnetguy Posted February 22, 2007 Share Posted February 22, 2007 in the example I gave would you put a paragraph inside a paragraph?A <p> is a block element with margins on the top and bottom if I had used the follow instead... <p>This is some text but this <p style="color:red">word</p> is red</p> The word would be red but the code would be invalid, make no sense semantically, and the output would be liek below instead of on the same line. This is some text but this word is red Link to comment Share on other sites More sharing options...
pulpfiction Posted February 22, 2007 Share Posted February 22, 2007 Next question....... Link to comment Share on other sites More sharing options...
PrateekSaxena Posted February 22, 2007 Author Share Posted February 22, 2007 I think all of us here are aware of the Simple Quiz that was started by an Cederholm. I thought it would be nice to get the same questions here and have a discussion on the questions. The moderators can give the final verdict for each question.So if the moderators do the honors!! Link to comment Share on other sites More sharing options...
Anders Moen Posted February 22, 2007 Share Posted February 22, 2007 Assuming we're talking current standards, number two. However, for xhtml 2.0, h1 is deprecated, in which case I'd go for number one.O_oWhen will the XHTML 2.0 come (if it already hasn't)? I wanna be even more excact with my coding lol Link to comment Share on other sites More sharing options...
Jonas Posted February 22, 2007 Share Posted February 22, 2007 O_oWhen will the XHTML 2.0 come (if it already hasn't)? I wanna be even more excact with my coding lol http://www.w3.org/TR/xhtml2/This document is the eighth public Working Draft of this specification. It should in no way be considered stable, and should not be normatively referenced for any purposes whatsoever.So you can't expect XHTML 2.0 anytime soon. Anyway, going off topic, let's try not to do that. Prateek, this is your topic, you do the honours, no particular reason for us to do it. In fact, the flow of this thread shouldn't have to be dependant of one of us checking continually to see if a question has to be posted. Link to comment Share on other sites More sharing options...
PrateekSaxena Posted February 23, 2007 Author Share Posted February 23, 2007 The next questions if you will - Q: When creating a basic unordered list, which of the following is more semantically correct? 1.Snickers<br /> Mounds<br /> Almond Joy<br /> Butterfinger<br /> Milky Way<br /> 2.<li>Snickers <li>Mounds <li>Almond Joy <li>Butterfinger <li>Milky Way 3.<li>Snickers</li> <li>Mounds</li> <li>Almond Joy</li> <li>Butterfinger</li> <li>Milky Way</li> 4.<ul> <li>Snickers</li> <li>Mounds</li> <li>Almond Joy</li> <li>Butterfinger</li> <li>Milky Way</li> </ul>The second SimpleQuiz question refers to creating an unordered list. Pretty straightforward, right? Let’s see…Start Answering! Link to comment Share on other sites More sharing options...
roondog Posted February 23, 2007 Share Posted February 23, 2007 I suggest no.4 is correct. Any advances on no.4 Link to comment Share on other sites More sharing options...
Jonas Posted February 23, 2007 Share Posted February 23, 2007 The approach in number 4 is correct, yeah. No mystery about that. Link to comment Share on other sites More sharing options...
PrateekSaxena Posted February 23, 2007 Author Share Posted February 23, 2007 All will look the same but i think that 4 will be search engine friendly! Link to comment Share on other sites More sharing options...
aspnetguy Posted February 23, 2007 Share Posted February 23, 2007 It is #4. #2 and #3 are not even valid in any version of HTML. Link to comment Share on other sites More sharing options...
PrateekSaxena Posted February 23, 2007 Author Share Posted February 23, 2007 Ha ha..you are right there but they were one of the options so I added them!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now