HTML

LocalStorage

LocalStorage in JavaScript: How to To use localStorage in your web applications, there are five methods to choose from: setItem(): Add key and value to localStoragegetItem(): Retrieve a value by the key from localStorageremoveItem(): Remove an item by key from localStorageclear(): Clear all localStoragekey(): Passed a number to retrieve nth key of a localStorage setItem() This method just as the name implies allows you to store values in the localStorage object. It takes two parameters, a key and a value. The key can be referenced later to fetch the value...

Read more...

How To Close an HTML Document?

How To Close an HTML Document You’ve reached the end of our absolute beginners HTML tutorial. The final step we need to complete is to close the <body> and <html> tags at the end of each page using the following HTML code: </body> </html> In this guide, you’ve learned how to create basic HTML web pages. You’ve also learned to add headings, text, images, links, lists and basic tables to these pages. What's Next? You can now use this knowledge to create your own web pages containing these...

Read more...

How To Add Tables In HTML

When drawing a table we must open an element with the <table> opening tag. Inside this tag, we structure the table using the table rows, <tr>, and cells, <td>. An example of an HTML table is as follows: <table> <tr> <td>Row 1 - Column 1</td> <td>Row 1 - Colunm 2 </td> <td>Row 1 - Column 3 </td> </tr> <tr> <td>Row 2 - Column 1</td> <td>Row 2 - Column 2</td> <td>Row 2 - Column 3</td> </tr> </table> This will produce a 2-row table with 3 cells in each row. Tables can get quite complicated, so be sure to check...

Read more...

How To Make an HTML List

How To Make an HTML List In web design, there are 3 different types of lists which you may wish to add to your site. Ordered List The first is an <ol>: This is an ordered list of contents. For example: An itemAnother itemAnother goes here. Inside the <ol> tag we list each item on the list inside <li> </li> tags. For example: <ol> <li>An item </li> <li>Another item </li> <li>Another goes here </li> </ol> Unordered List The second type of list that you may wish to include is an <ul> unordered list. This is better known as a bullet point list and...

Read more...

How To Add Images In HTML To Your Website

How To Add Images In HTML To Your Website In today’s modern digital world, images are everything. The <img> tag has everything you need to display images on your site. Much like the <a> anchor element, <img> also contains an attribute. The attribute features information for your computer regarding the source, height, width and alt text of the image. Styling and Formats You can check the file type of an image by right-clicking the item and selecting ‘Properties'. You can also define borders and other styles around the image using the class attribute. However, we shall...

Read more...