A simple CSS-only 3-tab layout is provided, with a tab for HTML5, CSS and JavaScript.
Use this to add 5 things you know about each language to each section actually using each language as follows! At least reach stage 2.
Add 5 different pieces of information about each language using the following elements:
- Add the HTML5 items in a table
- Add the CSS items in an unordered list
- Add the Javascript items in a definition list
Style each of the three language sections differently using CSS:
- Use alternate colours for the table rows (
tr) and style thethtags in the table head row separately. Useborder-collapseto close the gaps between the table rows - Style the unordered list
ulso that there are no bullet points and no margin or padding - give the
litags some padding of your own choice - Set a
border-topproperty above eachlitag and a finalborder-bottomto thelast-child - Style the definition term (
dt) and definition description (dd) items separately
Take and store user input from JavaScript, and create new DOM nodes:
- Delete the definition list and create a
formwith aninput type="text"field and aninput type="submit"button - review
getElementByIdandeventListenerfrom the local storage exercise - use Javascript to capture items from user input into the form field, and add a new paragraph each time.
- Use
localStorage.setItem("item-name", "value from form field");to store the data
To start your research, see JavaScript HTML DOM Elements (Nodes) (W3Schools) and Node.appendChild() (MDN Web Docs).