Hello!
Please, remove the iframe
(if not needed), and only include the content that goes inside your body
tag, since the <head></head>
(and all the content inside), the <body></body>
and the doctype declaration <!doctype html>
are not required. The opening <html>
and closing </html>
tags are not required either in codepen.
Besides that, this is what’s asked of you:
Which means you need a h1
tag with the exact id
attribute.
Hope it helps ,
Regards!
Hello, it’s still not working?
I updated it again.
You must have figured it out it passes the tests.
I don’t want to be harsh but you have:
</title> // there was no opening title
<style></style> // with nothing in this tag
<script></script> // with nothing in this tag
But you do NEED to format (indent) your code. Choose spaces or tabs, but format your code.
Just so everyone can learn: there’s no need to indent code (but you should do it) . I mean, the code will work no matter how it’s written in your text editor, as long as it’s valid.
It is useful while you’re developing your site/project, but it’s not required. In fact, for a production site, the code is usually uglified/minified to make it smaller, which makes for a faster download, like this.
Note: there may be instances when indentation and spacing influence the layout of the page (and be what’s expected).
Yes indenting is not technically required. The code will work without indenting. But it is very difficult to read and I can’t imagine if you were employed and working as a team they would say don’t format your code, just do whatever as long as it works. It’s probably just best to get in the habit of it if you plan on learning other languages because some languages do require indenting, i.e. Python.
Also, you most likely won’t read or edit minified code unless you are the developer of the software that minifies your code, or you’re only looking for a bug that is only in the minified code.
Do you really not indent YOUR code? I didn’t mean to be harsh on the OP, but indenting makes it easier to read and therefore also spot mistakes.
I didn’t disagree with you (nor thought you were wrong) . I edited my previous comment to (hopefully) make my intention clearer.
Okay, I can understand where you are coming from.
Are there any guides or courses that can help with indentation? I do want to get better at it if it is required for employment. I’m open to it if it means I can become a better programmer. I didn’t know that it was that big of a deal. I am planning on learning Python. I just haven’t had enough experience with indenting / formatting to know.
There’s no need for a guide.
There are some conventions for some languages, but the rules vary from project to project (or, most often, from company to company and language).
Your employer should provide you with the guidelines for coding standards. Take FreeCodeCamp as an example; when you work on the curriculum code, there are rules setup for formatting the code just before commiting it to GitHub, which means you’re not even required to manually format the code, though you should do it anyway because it helps you find errors that may otherwise alter the expected results.
To manually format your code:
On codepen, click on the arrow pointing down in the code editor you’re modifying (CSS, HTML or JavaScript), then click on Format HTML:
On the FreeCodeCamp editor, you can press Control + Shift + i
to format it (same as Visual Studio Code and Atom–by default).
There are similar tools for every editor or IDE, so you don’t have to manually indent the code. Most of the time you will create a configuration file and the editor will do the formatting .
If you want to read more, search online for best practices for insert_language, replacing insert_language for the language you’re working with (best practices for html code formatting, for instance).