January 24, 201313 yr So Im elarning to code and I swear code academy is faulty what have I done wrong? Question: On line 7, make the text size 8px. On line 8, make the text size 12px. On line 9, make the text size 44px. <!DOCTYPE html> <html> <head> <title>First font size change</title> </head> <body> <p> <p style = "font-size: 8px">Some text for you to make tiny! </p> <p> <p style = "font-size: 12px">Some text for you to make normal size!</p> <p> <p style = "font-size: 44px"> Some text for you to make super big!</p> </body> </html> Edited January 24, 201313 yr by Juelz
January 24, 201313 yr Well you've opened a <p> tag... <p style = "font-size: 8px"> Then opened another one directly after (without any styling)... <p>Some text for you to make tiny! And then you only closed one and you also close an <a> tag that never started... </p></a> Also, on the second line of content, you have a rogue "> just before you opened the second <p> tag. Just to help you a little further... I'm not sure exactly what it is that you're trying to accomplish but I'm assuming that it's supposed to look like this... <!DOCTYPE html> <html> <head> <title>First font size change</title> </head> <body> <p style="font-size: 8px">Some text for you to make tiny!</p> <p style="font-size: 12px">Some text for you to make normal size!</p> <p style="font-size: 44px">Some text for you to make super big!</p> </body> </html>
January 24, 201313 yr Author Well you've opened a <p> tag... <p style = "font-size: 8px"> Then opened another one directly after (without any styling)... <p>Some text for you to make tiny! And then you only closed one and you also close an <a> tag that never started... </p></a> Also, on the second line of content, you have a rogue "> just before you opened the second <p> tag. Just to help you a little further... I'm not sure exactly what it is that you're trying to accomplish but I'm assuming that it's supposed to look like this... <!DOCTYPE html> <html> <head> <title>First font size change</title> </head> <body> <p style="font-size: 8px">Some text for you to make tiny!</p> <p style="font-size: 12px">Some text for you to make normal size!</p> <p style="font-size: 44px">Some text for you to make super big!</p> </body> </html> Its a html tutorial from code academy and I didnt actually write the code... I only added in the "<p style="font-size: 8px">" which was from there example! Heres another example they give To change the color of text, simply add the style attribute in the opening tag, then make the style equal to "color:blue" (or whatever color you like). For example: <h2 style="color:red"> Edited January 24, 201313 yr by Juelz
January 24, 201313 yr You added a new <p> element rather than editing their existing one... Rather than adding... <p style="font-size: 44px"> You should have just added... style="font-size: 44px" to the existing <p> element like I've demonstrated in my example.
Create an account or sign in to comment