How-to articles, tricks, and solutions about HTML

How to Customize File Inputs

It is possible to customize the file input using a <label>. In this snippet, you’ll find the way of customizing the file input without using any JavaScript.

How to Cut Corners With Pure CSS

If you want your Website to look creative, then read our snippet and learn how to get a cut corner effect using different methods and try some examples.

How to Disable Form Fields with CSS

In this tutorial, we’ll demonstrate how it is possible to disable form fields with some CSS. For that, you can use the pointer-events property set to “none”.

How to Disable the Browser Autocomplete and Autofill on HTML Form and Input Fields

Learn how to prevent browsers auto filling the input fields of HTML forms. Use autocomplete="off" to specify that autocomplete is disabled. See examples.

How to Disable Word Wrapping in HTML

In this snippet, we’re going to demonstrate how you can disable word wrapping. For that, use the white-space property either with the “nowrap” or “pre” value.

How to Display an Ordered List with Nested Counters

In this snippet, we’re going to show how you can display an ordered list with nested counters by using CSS. See some methods of overcoming this problem.

How to Display Base64 Images in HTML

In this snippet, we’re going to demonstrate how you can display Base64 images in HTML. Use the HTML <img> element to embed Base64 encoded image into HTML.

How to Display Ellipsis in the <span> Element Having Hidden Overflow

In this tutorial, see how to display ellipsis in the <span> element having the CSS overflow property with the “hidden” value. Add the text-overflow property.

How to display string that contains HTML in twig template?

To display a string that contains HTML in a Twig template, you can use the raw filter.

How to Display Symbols with HTML

In this snippet, you can see how to add and display different symbols, such as infinity ampersand and other symbols. For that, you need to use HTML Entities.

How to Display Unordered List in Two Columns

In this snippet, we’re going to demonstrate how you can display an unordered list in two columns using either the CSS columns or column-count property.

How to Distinguish Between Left and Right Mouse Click with jQuery

In this tutorial, you will read and learn useful information about the fastest method of distinguishing between left and right mouse click with jQuery.

How to Divide a Horizontal Line into Multiple Parts

In this tutorial, you will learn how it is possible to divide an HTML horizontal line into multiple parts. For that, you can use the CSS border-top property.

How to Embed PDF in HTML

Learn how to embed PDF documents in HTML using the a and iframes tags, and make PDF files not downloadable with W3Docs. Practice with examples

How to Flip Text with CSS

CSS3 allows us to have various effects, including text flipping due to transformation functions. See examples of upside down, horizontal and vertical flipping.

How to Force the Content of the <div> Element to Stay on the Same Line

In this snippet, we’ll demonstrate how to force the content of the HTML <div> element to stay on the same line. Use the overflow and white-space properties.

How to Get Current URL in JavaScript

Read and learn how to get the current URL in JavaScript by using Location object properties. Also, gain an understanding about URL and its components.

How to Get Multiple Selected Values of the Select Box in PHP

Learn how to get multiple selected values of the selected box in PHP. In our snippet, we provide you with comprehensive information and handy examples.

How to Get the data-id Attribute

Read this tutorial and learn the right ways of getting the data-id attribute using jQuery two methods. Also, learn more information about the two methods.

How to Get the Value of a Textarea using jQuery

Read this tutorial and learn useful information about how you can detect the value of the HTML <textarea> element easily using one of the jQuery methods.

How to Get the Value of Text Input Field Using JavaScript

Read this tutorial and learn about several methods of getting the value of the input textbox value without wrapping the input element inside a form element.

How to Give a Div Element 100% Height of the Browser Window

Learn How to Give a Div Tag 100% Height of the Browser Window. Let’s see an example and try to discuss each part of the code together with W3docs.

How to Handle Page Breaks when Printing a Large HTML Table

In this snippet, we’re going to show how to deal with the problem connected with page break when you print a large HTML table. Use some CSS properties.

How to Hide and Show a <div>

Read this tutorial and learn several CSS, JavaScript and jQuery methods of hiding and showing the <div> element. Also, you can find examples and try them.

How to Hide Elements in a Responsive Layout

On this page, we are going to demonstrate how to hide elements in a responsive layout. Read this tutorial to find out how to use CSS and Bootstrap for that purpose.