Ask coding questions

← Back to all posts
What is wrong with this code, can someone please help!
TQld (0)

It looks exactly the same as the final page I am trying to design but it is saying there is 2 errors in the uppercase section. I can't see the problem. Any help would be greatly appreciated!

<!DOCTYPE html><html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>repl.it</title> <link href="index.css" rel="stylesheet" type="text/css" /> <style> #heading { font-family: Arial; background-color: red; color: white; } #uppercase { text-transform: uppercase; } </style> </head> <body> <div id="heading"> <h1>Sporting History</h1> <p id="uppercase"> Giants & Heroes</p> </div> <h3>Track & Field</h3> <p> Some sporting feats ridicule expectations, fewer violate logic but the rarest of all added a defying of gravity to a hat-trick of achievements. At 3.45pm on 18 October 1968 in Mexico City’s Estadio Olímpico Universitario Bob Beamon accomplished all three. </p> <h3>Rugby</h3> <p> With the game locked at 10 – 10 with thirty minutes on the clock, a Munster scrum just outside the Biarritz line enabled Peter Stringer to do the unexpected and break on the blindside for an unforgettable try. A moment of sheer brilliance by the Munster and Ireland scrumhalf. The try proved to be crucial as Munster won by 23 – 19 to lift the European Cup in Cardiff. </p> </body> </html>
Answered by lightningrock (101) [earned 5 cycles]
View Answer
Voters
TQld (0)
Commentshotnewtop
lightningrock (101)

There's no error. If there is could you be more specific?

TQld (0)

@lightningrock

Hi there and thank you so much for your quick reply! Below are a few screenshots to add some context to my problem. I can't see what I am doing wrong, it looks correct, but I am getting an error message and can't submit the file until it is all green (correct). Thanks again!

More detailed description of error

Error

Steps I needed to complete

What the final page should look like (which mine does)

lightningrock (101)

Hm... Try putting your CSS in another file and linking it.
You already have a CSS link

So just create another file called index.css and put your csss in it.
Example: https://repl.it/@lightningrock/CSS-ID-selector#index.html

@TQld

TQld (0)

@lightningrock That worked! Thank you so much! It didn't mention anywhere in the task that I should put that into a seperate .css file. Do I always have to do that? Or I just removed that line of code (as it was linking to the external file) and now it aworks when its all kept in a single html file!

lightningrock (101)

Well just look out for css link line. If there is then use it, if there isn't then I guess it's up to you. @TQld

TQld (0)

@lightningrock I will keep an eye out in the future for that one. I wish I had of got on here earlier to ask. I spent many hours searching and trying different things. Thank you again for you help mate, it is much appreciated! Have a great day

lightningrock (101)

np :) Also, can you mark my answer as correct? (click the check.) @TQld

TQld (0)

@lightningrock Done mate, thanks again!

Coder100 (8395)

You appear to have passed the tests, it must be a bug with repl.it? You should contact your teacher.

TQld (0)

@Coder100 It says that I have failed on my end

Coder100 (8395)

hmm, that's strange @TQld

Coder100 (8395)

the failed test does not state a line @lightningrock

lightningrock (101)

I think it wants @TQld to use a css file as there is a css file link but he did not use it.
@Coder100

TQld (0)

@Coder100 I think @lightningrock has worked it out, it seemed that this line of code

<link href="index.css" rel="stylesheet" type="text/css" /> Was looking for an external .css file which I hadn't set up. Thank you so much for your quick response and willingness to help out a coding newbie. Have an awesome day!
Whacko (205)

What do you want it to look like?

TQld (0)

@JavaMaster1

Hi there and thank you so much for your quick reply! Below are a few screenshots to add some context to my problem. I can't see what I am doing wrong, it looks correct, but I am getting an error message and can't submit the file until it is all green (correct). Thanks again!

More detailed description of error

Error

Steps I needed to complete

What the final page should look like (which mine does)

Whacko (205)

@TQld You may have fixed the problem, because it shows no error. Tell me if I'm wrong.

TQld (0)

@JavaMaster1 No unfortunately not! It is still showing the 2 errors in red, it says the errors revolve around the "uppercase" style element and "uppercase" text transform rule i think. The attached pictures show what they say the errors are but I don't understand whats wrong so that I can fix it.

Whacko (205)

@TQld What line is the error on?