How to read user input from console in Java 25
How to read user input from console in Java 25 problem You’re writing a console application and wish to let the user input some data into the app like his name, age, etc. In this post we will see how to do that using Java 25. SOLUTION Using the IO library and the static methods, […]
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 […]
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, […]
How to add a datepicker in HTML
How to add a datepicker in HTML problem You wish to let your user select a date on your website in a user-friendly way. Instead of typing in the day, month and year, you wish to use a pop up calendar and let the user select the date. SOLUTION By using the <input> tag with […]
How to add a password field (textbox) in HTML
How to add a password field (textbox) in HTML problem You wish to let your user type a password on your webpage, e.g. for login or signing up. In this post we will see how to use a password field which is similar to a textfield with the difference of not showing what is being […]
How to add a colorpicker in HTML
How to add a colorpicker in HTML problem You wish to let the user pick a color on your website. In this post we will see how to use the <input> tag to allow the user to choose a color like in the screenshot (varies from OS to OS). SOLUTION Using the <input> tag with […]
How to add a list in HTML
How to add a list in html problem You’re learning HTML and wish to place some information on your webpage as a list, either bullet point or numbered list. In this post we will see how to do that. SOLUTION Using the <ul> tag or the <ol> tag. Both of the tags have opening and […]