Q. How to create one HTML program ti create a list of grocery items.
{Warning ⚠️ IF YOU DONT NO PLEASE DON'T ANS WRONG BCOZ IT WASTE MY AND YOUR TIME U GET REPORTED IF I FOUND WRONG . }
Answers
Explanation:
HTML
<body>
<div id="header">
<h2>Add an item below</h2>
<input id="inputText" type="text">
<button onclick="addToList()">add</button>
</div>
<ul id="list">
</ul>
Explanation:
<html>
<head>
<title>Grocery List</title>
</head>
<body>
<p id="newItemLabel">Add a New Item:</p>
<form>
<input type="text" name="itemName" id="itemName" value="Item Name"/>
<input type="text" name="itemAmount" id="itemAmount" value="Item Amount"/>
<select>
<option value="Other">Other</option>
<option value="Vegetables">Vegetables</option>
<option value="Fruits">Fruits</option>
<option value="Grains">Grains</option>
<option value="Canned Goods">Canned Goods</option>
<option value="Snacks">Snacks</option>
<option value="Beverages">Beverages</option>
<option value="Meat">Meat</option>
<option value="Dairy">Dairy</option>
<option value="Frozen">Frozen</option>
<option value="Household">Household</option>
</select>
<input type="button" value="add" id="addButton" onClick="" name="add"/>
</form>
</body>
</html>
easy Way
<body>
<div id="header">
<h2>Add an item below</h2>
<input id="inputText" type="text">
<button onclick="addToList()">add</button>
</div>
<ul id="list">
</ul>
</body>