How-to articles, tricks, and solutions about HTML

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 Create a Multi-Line Text Input Field In HTML

In this snippet, we’ll demonstrate how to create a multi-line text input field in HTML. Read this tutorial and see how this can be done with the <textarea> tag.

How to Add a Border Inside the Table

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.

How to Increase the Space Between the Dots of Dotted Borders

In this snippet, we’ll show how you can overcome the difficulty of increasing the space between the dots of dotted borders. See what properties you can use.

How to Create an HTML Table with a Fixed Left Column and Scrollable Body

It is possible to create a table, which has a fixed left column and a scrollable body. In this snippet, you’ll see how this is done using some CSS properties.

How to Create a Hidden Div without a Line Break or Horizontal Space

In this snippet, we’re going to demonstrate how you can create a hidden <div> element without a line break or horizontal space. Use the CSS display property.

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 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 Add Border Inside a Div

If you need to place a border inside a <div> element, you are in the right place. In this snippet, you can find out how to do it using some CSS properties.

How to Make a Div Fill the Remaining Width

In this snippet, we’re going to demonstrate some ways of making a <div> expand to fill the remaining width. You can use the float and overflow properties.

How to Set the Table Column Width Regardless of the Text Amount in its Cells

Sometimes, when the text in one of the cells of the column is too long, the column’s width change. Read this snippet to find out how to overcome this problem.

How to Use the "required" Attribute with the Radio Input Field

Read this snippet to find out how you can use the “required” attribute with the radio Input field. Here, you can also find an example and try it yourself.

How to Add Multiple <tbody> Elements in the Same Table

A <table> can have multiple <tbody> elements each of them specifying a row group. Read this snippet to see how to add several <tbody> elements in the same table.

What is the Difference Between the "id" and "name" Attributes

In this snippet, we’re going to discuss the differences between the “id” and “name” attributes, after which you’ll make a better decision of their usage.

Which are the Valid Values for the "id" Attribute

The “id” attribute defines a unique identifier for HTML elements. In this snippet, you can find out, which are its valid values for HTML, CSS, and Javascript.

What is the Difference Between <b> and <strong>, <i> and <em> Tags

In this snippet, we’re going to explain the differences between the <b> and <strong>, <i> and <em> tags. Find out the differences and use them correctly.

When to Use HTML <img> Tag and CSS background-image Property

In this snippet, we’ll discuss the differences between the HTML <img> tag and CSS background-image property, which will help you make a better decision.

What is the Difference Between <section> and <div> Elements

Read this snippet to find out the differences between the HTML <section> and <div> elements and see which element to use in some specific situations.

How to Overlay One Div Over Another

In this snippet, we’ll demonstrate how you can create an overlay effect for two <div> elements. For that purpose, use the CSS position and z-index properties.

How to Change the Color of an <hr> Element

The HTML <hr> element is a block-level element and creates a horizontal line. In this snippet, find out how to style a horizontal line by adding a color to it.

How to Create Checkbox with a Clickable Label

It is possible to create a checkbox with a clickable label. In this snippet, you can see how to create a checkbox with a clickable label with two methods.

How to Create an Unordered List without Bullets

In this snippet, we’re going to demonstrate how to create an unordered list without bullets using the CSS list-style-type property for the parent element.

How to Make a <div> Fill the Height of the Remaining Space

In this snippet, you can find some methods of making a <div> fill the remaining space. Use flexbox, absolute positioning, tables, or the calc() function.

How to Create a Teardrop in HTML

The best way of creating a teardrop is to use SVG, which is used to specify vector-based graphics. In our snippet, we show how to create a teardrop using SVG.