Can't understand 'action' element in forms

What is the function of the ‘action’ element? Is it a separate tag than ‘form’ tag? How else can I use it? Does it have a singular function which is defined by the tag I am using it in? Can anyone please explain what ‘action’ can do in html. Any help will be appreciated.

  **Your code so far**

<p>Click here to view more <a href="#">cat photos</a>.</p>

<a href="#"><img src="" alt="A cute orange cat lying on its back."></a>

<p>Things cats love:</p>
  <li>cat nip</li>
  <li>laser pointers</li>
<p>Top 3 things cats hate:</p>
  <li>flea treatment</li>
  <li>other cats</li>
<form action = "">
<input type="text" placeholder="cat photo URL">
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36 Edg/95.0.1020.53

Challenge: Create a Form Element

Link to the challenge:

‘action’ in form element specifies where to send the data entered by the user in the form.

It generally is a URL pointed to another website or cloud or database link which stores data.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.