# HTML Forms And Canvas

# HTML Forms

## **👉** The <input> Element

- The HTML `<input>` element is the most used form element.
- An `<input>` element can be displayed in many ways, depending on the `type` attribute.
- Here are some examples:


![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1667609074970/oHGA7MSNC.png align="left")

# **👉** HTML Form

- An HTML form is used to collect user input. The user input is most often sent to a server for processing.

**👉 Example** ➖
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1667609111491/71LInQcB7.png align="left")

# HTML Canvas

# **👉** What is HTML Canvas?

- The HTML `<canvas>` element is used to draw graphics, on the fly, via JavaScript.
- The `<canvas>` element is only a container for graphics. You must use JavaScript to actually draw the graphics.
- Canvas has several methods for drawing paths, boxes, circles, text, and adding images.
- A canvas is a rectangular area on an HTML page. By default, a canvas has no border and no content.
- The markup looks like this:

👉 Example➖
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1667609167946/ydrvYK5ev.png align="left")

-----------------------------------------------------------------------------------------------
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1666336375150/5HqI8zNVh.png align="left")> 
Download our HTML & CSS Visual Treat! ebook Here: 
[Click here](https://codemarch.gumroad.com/l/hxazr)



