How to style text using CSS

How to style text using CSS problem You wish to style text on your webpage and make it look as follows: Bold Italic Underlined strikethrough SOLUTION Using CSS rules; declarations with basic selectors. For example, we have a paragraph tag <p> (selector) with text and we want to style it (declaration). The paragraph is as […]

How to create a form in HTML

How to create a form in HTML problem You wish to collect user information from a web page, e.g. registering a user, login in. This can be done with an Html form and a user filling that form. SOLUTION Using the <form> tag. This tag has an opening and a closing tag and it acts […]

Using Javascript to scroll up or down a webpage

Using Javascript to scroll up and down the webpage problem You wish to perform a dynamic scroll of the webpage vertically or horizontally. In this post we will see how to perform a scroll using Javascript. SOLUTION In Javascript, we have the scroll() method provided by the window object. Let’s see an example, but first […]

How to change background color using CSS

How to change background color using CSS problem You wish to change the background color of the whole page or any other sub segment of the website. In this post we are going to see how to accomplish this by using CSS – Cascading Style Sheet. SOLUTION Using a CSS property. In particular, the property […]

How to use the progress bar in HTML

How to use the progress bar in HTML problem You will like to use a progress bar on your web page. For example to show the progress of a process. Instead of showing a percentage, you visually convey the status using a progress bar. SOLUTION In HTML we have the <progress> tag. It has an […]

How to use the header tag in HTML

How to use the header tag in HTML problem In web pages, we often see headlines. That is a one line text in big size that appears as a heading. For example, the title of an article. In this post we will see how to put headers on a web page. SOLUTION Using the headers […]

How to add comments in HTML

How to add comments in HTML problem In HTML we can comment out our code by using the comments tags. In this post we will see an example of how to add comments. SOLUTION Similar to other tags in HTML that have opening and closing tags; the comments are enclosed between the following symbols: comments.html […]

How to use the label tag in HTML

How to use the label tag in HTML problem You wish to use a label in HTML to show some text on the webpage. A label can be used in combination with  a user-input tag like a textfield, checkbox, etc. Or it can be used to keep a piece of data hidden from the user […]

How to add a numerical box (textfield) in HTML

How to add a numerical box (textfield) in HTML problem You wish to add a numerical box on your web page to better guide your user to enter numbers only. SOLUTION By using the <input> tag with type=”number”. For example: numerical_box.html output We can either click on the buttons that are inside the box to […]

How to add a checkbox in HTML

How to add a checkbox in HTML problem You wish to add a checkbox on your webpage like shown below. In this post we will see an example of adding a checkbox and a group of checkboxes. SOLUTION Using the <input> tag with attribute type=”checkbox”. For example: checkbox.html output After you click on it Cool, […]

Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

Strictly Necessary Cookies (Ads)

Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings. We use Google Ads on this site.

Google Analytics Cookies

This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.

Keeping this cookie enabled helps us to improve our website.

HotJar Cookies

We use Hotjar in order to better understand our users’ needs and to optimize this service and experience. Hotjar is a technology service that helps us better understand our users’ experience (e.g. how much time they spend on which pages, which links they choose to click, what users do and don’t like, etc.) and this enables us to build and maintain our service with user feedback. Hotjar uses cookies and other technologies to collect data on our users’ behavior and their devices. This includes a device's IP address (processed during your session and stored in a de-identified form), device screen size, device type (unique device identifiers), browser information, geographic location (country only), and the preferred language used to display our website. Hotjar stores this information on our behalf in a pseudonymized user profile. Hotjar is contractually forbidden to sell any of the data collected on our behalf.

For further details, please see the ‘about Hotjar’ section of Hotjar’s support site.