Att Form Action
# HTML
```
### Attribute Values
| Value | Description |
| :--- | :--- |
| **Absolute URL** | Points to an external website or a complete web address (e.g., `action="https://www.example.com/submit-form"`). |
| **Relative URL** | Points to a file or endpoint within the same website (e.g., `action="/api/submit-form"` or `action="demo_form.php"`). |
| **Empty String / Omitted** | If left empty or omitted in HTML5, the form will submit to the current page's URL. |
---
## Code Examples
### Example 1: Basic Form Submission (Relative URL)
In this example, when the user submits the form, the data is sent to a local file named `demo_form.html` using the default `GET` method.
```html
```
### Example 2: Submitting to an External API (Absolute URL)
This example demonstrates sending form data to an external server using the `POST` method, which is ideal for sensitive data or database modifications.
```html
```
---
## Differences Between HTML 4.01 and HTML5
* **HTML 4.01:** The `action` attribute was **required** for a `
YouTip