How to add a text field in HTML
How to add a text field in HTML problem You’re learning HTML and wish to add a text field/ text box on your web page so the user can type some text inside e.g. the name of a place. In this post we will see how to add one. SOLUTION Using the <input> tag. With […]
How to add a video in HTML
How to add a video in HTML problem You’re learning HTML and wish to place a video item on your page. In this post we will see how to load and play a video from a local video file and remotely via a URL. SOLUTION Using the <video> tag. It has an opening and closing […]
How to add a horizontal line in HTML
How to add a horizontal line in HTML problem You’re learning HTML and wish to add a horizontal line in your page. SOLUTION Using the <hr> tag. The thematic break (horizontal rule) element. For example we have two paragraphs of text and we wish to place a line between them. hr.html First paragraph Second paragraph […]
How to add an image into an HTML page
How to add an image into an html file problem You’re learning HTML and wish to add an image into your page. In this post we will see how to use the <img> tag to load an image that is stored locally and also from a remote source. SOLUTION Using the <img> tag. Let’s suppose […]
How to create a table in HTML
How to create a table in HTML problem You wish to add a table in your HTML page. This post shows how to create a simple table with couple of rows and columns. SOLUTION In HTML, we can use the <table> tag to specify an element that will be table. Tables are usually for tabular […]
html add action on click of a button
html add action on click of a button Problem You are designing a webpage and wish to place a button that does something when you click it. This post we will use a simple HTML code that has a button and when you click it shows a hello popup. Solution A simple HTML page with […]
How to use a timer in JavaScript
How to use a timer in JavaScript Problem You are designing a web page and wish to add interactivity that will be occurring periodically. For example, it will be sending a request to an API every 10 seconds to retrieve information. For this post, we will use an example of updating a number incrementally every […]
Hide elements on mobile version using CSS
Problem You designed a web page and a particular element needs to appear only when the user visits the page from their Desktop. If the user visits the page from a smaller device, like a mobile or tablet, the element needs to be hidden. Solution CSS has a feature called media rules. Media rules allow […]
Hello World in HTML
Hello World in Html Problem No problem here, just need to write the simplest program when you start programming in the simplest language. The well-known Hello World program. The program when runs simply shows a “Hello World” message to the user (world). Code Save the above in a file with .html extension e.g. hello_world.html Open […]