Profile image of UnderaGlassMoon
Submitted by UnderaGlassMoon
almost 11 years

Question about nested html tags

In the Style that head! exercise, you have to make the “Famous Monsters by Birth Year” title red. (I apologize in advance for the awkward English)

Now, thanks to a question asked in the spanish forum by Zee Dier, I redid the exercise and tried the following:

<th colspan="2" style="color: red;">Famous Monsters by Birth Year</th>

and SCT says it is correct. Then I reset the code and tried this:

<th colspan="2"; style="color: red;">Famous Monsters by Birth Year</th>

it’s fine too. I restarted again and tried this

<th style="colspan=2; color: red;">Famous Monsters by Birth Year</th>

also okay.

So the actual question would be: are those three ways of tag nesting well written? Is there something wrong with the SCT? Thank you!

Answer 54cc014ed3292f912a0003d0

1 vote

Permalink

Resetting does reset the lesson, but it doesn’t clear the session cache so correct code is still present in memory (or something to this effect). To truly reset, Reset and Refresh to begin a brand new session with an empty cache. This is how I have come to think of it, anyway.

The first of your examples is “well formed”; the second has a validation error (the semi-colon after the attribute) which may or may not be ignored, even by a validator (have to try it at validator.w3.org); and the third shouldn’t even work, but the browser may ignore the incorrect bits and try to render what it can make sense of: A single cell with red text.

You are wise to experiment and bring this up, since half of learning what we can or should do stems from learning what we cannot or should not do. They are like inverse analogs of each other, so to speak.

As for the SCT, well that’s a beast of many colors and behaviors since nearly every lesson checks for different things relating to the instructions, and not much else. The SCT can let a lot of stuff by if the interpreter doesn’t throw an error, and sometimes even then the SCT will let it pass.

We cannot rely upon the SCT as an authority, for this simple reason. Each lesson checker is written by a human with a particular aim in mind. Things get overlooked. Anything that makes you think or wonder is worth taking a moment out to research and read up on. No detail is too small or insignificant, and every question deserves an answer before moving on so it doesn’t plague us down the road. Find those answers as you go.

Profile image of mtf
Submitted by mtf
almost 11 years

1 comments

Profile image of UnderaGlassMoon
Submitted by UnderaGlassMoon
almost 11 years

Ohh, I didn’t know about not really reseting because of not refreshing the page. I kept telling users about reseting the code but that not always solved the problem. Now I know why, thank you :).          Yeah, part of my doubts were about how much I could trust the SCT with this. It’s like when the SCT marks error at this

text

(which is fine) but validates this

text

(which is wrong).          Okay so now that I know what of the examples is correct I can point anyone who ask again to your response. Thank you, Roy!

Popular free courses

  • In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.
    • Beginner Friendly.
      4 Lessons
  • Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.
    • Beginner Friendly.
      11 Lessons
  • Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.
    • Beginner Friendly.
      6 Lessons
Explore full catalog