How-to articles, tricks, and solutions about HTML
You can add the "active" class to the active page using PHP by comparing the current URL to the URL of the page you want to mark as active.
To upload an image using Ajax, you can use the following steps:
To clear the contents of a text file using PHP, you can use the file_put_contents() function.
Yes, you can add a confirm button before running a delete routine on a website using PHP.
In PHP, you can use the nl2br() function to convert line breaks (\n or \r\n) to <br /> tags.
Incorrect information leads to bad user interactions. So as to prevent this problem, read and learn how to validate forms with the help of JavaScript!
You can use the following HTML code to create a form that allows users to select and upload multiple files.
You can use the PHP function readfile() to read the contents of a Word document and then use the appropriate headers to prompt the browser to open or download the file.
To add PHP code to an HTML file, you will need to use PHP tags.
To return a proper success/error message for jQuery.ajax() using PHP, you can do the following:
In this snippet, we want to demonstrate how you can make the contents of the <p>, <div>, and <span> elements not to wrap. Use the CSS white-space property.
On this page, you will find how to set a background-color for the text width instead of the width of the entire element. Choose the appropriate method and try examples.
Read this snippet if you have faced the difficulty of setting a border inside the table. In this tutorial, we suggest two methods of overcoming this problem.
In this tutorial, we want to demonstrate how you can add a border only to the bottom of the table row. Read and find out what CSS property you need for this.
Adding a circle around a number can be easily done with CSS. This can be done using the border-radius property. Read our snippet and find the solution.
If you want to use beautiful effects for texts and make your Website more eye-catching, read our snippet, try examples and learn to create fade out text effect.
On this page, you will find out how to add a fixed-width column with the help of CSS Flexbox. To achieve this, you need to use the flex or flex-basis property.
If you want to make your website eye-catching and creative read this snippet and learn to create a glass background effect for your text step by step.
In this tutorial, find out how to create a mouseover text description without Javascript. Use the HTML <div> or <span> element with the “title” attribute.
In this tutorial, you’ll find out how to add text on the HTML5 <canvas> element. For that, you need Javascript. Use the fillText() and strokeText() methods.
In this snippet, we’ll show how to add a vertical line on the left and right sides, as well as how to center it and how to add a vertical line before a text.
Learn how to create an anchor link to jump to a specific section of a page, and how to link to the anchor from another webpage. Also see how to style the jumping anchor link with examples.
There are several ways to place a clickable button on a webpage that will be linked to another page of your website. You can add inline onclick event to HTML button tag, or input tag.
In this snippet, we’ll demonstrate how to add an onclick event in CSS. The best way of creating an onclick effect is using the well-known checkbox hack.
Read this tutorial and learn how you can remove multiple options or a specific option in the select list using some interesting and useful jQuery methods.