Tell us what’s happening:
I seem to be unable to get past the last element below… creating a form. Can you see what i’ve done incorrectly. It keeps telling me my text input tag needs to be nested in a <form tag… but i have done that.
Any advice would be appreciated.
Your code so far
<h2>CatPhotoApp</h2>
<main>
<p>Click here to view more <a href="#">cat photos</a>.</p>
<a href="#"><img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
<input type="text" placeholder="cat photo URL">
<form
input type="text"
action="https://freecatphotoapp.com/submit-cat-photo">
</form>
</main>
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36.
but you need to put the input element inside the form element, input is not a valid attribute for form
(you wrote input inside the opening tag, but you instead need to put the opening <form> tag before the existing input element, and the closing </form> tag after the existing input element)
I put this in my reply on the “chat” system, but I don’t know if it showed at your end. This is what I thought you meant in your earlier reply.
It still seems to be coming up wrong! Could you please correct what I’m doing so I can see my actual error as it appears I am not understanding the “terms” you are referring to.
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
I’m afraid I apparently still don’t get it! So this will be my last attempt at understanding what needs to be done.
First, this is the actual dialogue from the module:
Basic HTML and HTML5: Create a Form Element
You can build web forms that actually submit data to a server using nothing more than pure HTML. You can do this by specifying an action on your form element.
So far, so good…. Now the problem. After running the test, I get the following response:
// running tests
Your text input element should be nested within a form element.
Your form element should have well-formed open and close tags.
// tests completed
I assume that it is now asking me to integrate the previous element of code from the last lesson into the form:
This is where I have the problem, since you have advised that input and placeholder tags do not go into I am at a loss as to how to integrate this piece of code. May I request that you simply write the entire code between the two form tags <form……….
to put something inside an element you need to put it after the opening tag of the element and before the closing tag of the element, if there is nothing between the two, then the element is empty
so, what’s between the opening and closing tag of your form element?
nothing, because there is the > of your opening tag, and then the < of your closing tag, nothing in between, you should have something in there…