Jump to content

Simple Quiz


PrateekSaxena

Recommended Posts

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

here is an example - <<snip, snip>>

Edited 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

So shall we start?@Jonas or aspnetguy: Please post the first question from the link!!

Link to comment
Share on other sites

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

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

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

#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

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

why cant we use <P> for the same?

Link to comment
Share on other sites

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

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

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

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

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

All will look the same but i think that 4 will be search engine friendly!

Link to comment
Share on other sites

Ha ha..you are right there but they were one of the options so I added them!!

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...