How-to articles, tricks, and solutions about HTML
It is possible to make the <div> to automatically adjust to the background size without setting a specific height or min-height. In our snippet, we’ll show how this can be done.
In this snippet, you’ll see how to make the text bold by using the <strong> or <b> tags. Also, you can use the CSS font-weight property in the HTML part.
In this snippet, you can find two methods of making a text input non-editable. Use either the HTML “readonly” attribute or add the CSS pointer-events property.
In this JavaScript tutorial, you will read and learn detailed information about the method used for managing a redirect request after a jQuery Ajax call.
It is possible to match an empty input box only if the input field is required. In this snippet, we’ll show how to do this using the CSS :valid pseudo-class.
In PHP, you can match whitespace, carriage return, and line feed using the following regular expression:
To minify HTML output in PHP, you can use the following steps:
In this snippet, you can find out how it is possible to open a link from the HTML <iframe> element in the parent window. For that, you can use the <base> element.
How to open hyperlink in a new tab using the target="_blank" attribute. Learn also how to do that by using JavaScript window.open function. See examples.
In a jQuery AJAX request, you can output the response HTML data using the .html() method.
Overlays can be a great addition to the image and create an attractive website. In this snippet, you can find different examples of overlaying images with CSS.
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.
On this page, we’ll demonstrate how you can place your <div> element in the middle of the screen. For that, you need to use the CSS position property.
Sometimes, you may need to place one image over another one. It can be easily done with HTML and CSS. See how to use the position and z-index properties.
In this snippet, we are going to present some methods that you can use to prevent long words from breaking a <div> element. For that, use HTML and CSS.
When you center a page, it may move slightly on some browsers when navigating between pages. In this snippet, we’ll demonstrate how to solve this problem.
In this snippet, we demonstrate how it is possible to prevent tab indexing on specific elements. Read our tutorial to find out the answer and also try examples.
On this page, you will find out how it is possible to prevent the appearance of lines around a circle, which is created with the CSS clip-path property.
The meta tag with the http-equiv parameter set to Refresh is used to redirect a web page in HTML. Take a look at how you should do it. Practice with examples.
On this page, we’re going to demonstrate how you can relatively position an element without it having to take space in the document flow. Use CSS properties.
Read this JavaScript tutorial and learn several simple and fast methods that are used for removing all the child elements of the DOM node with examples.
How to Remove Borders from the <iframe> Tag
In this snippet, we’re going to demonstrate how you can remove the default arrow icon from a dropdown list. For that, you can use the appearance property.
In this snippet, you can see how to remove the focus around a button on click. To solve this problem, you use the CSS outline property with the “none” value.
There are a few different ways to remove line breaks from a string in PHP. Here are two options.