AmitDiwan has Published 11365 Articles

Disable browser caching with meta HTML tags

AmitDiwan

AmitDiwan

Updated on 06-Dec-2022 10:10:43

16K+ Views

To disable browser caching with tag in HTML, use the following code − HTML lets you specify metadata - additional important information about a document in a variety of ways. The META elements can be used to include name/value pairs describing properties of the HTML ... Read More

Recommended way to embed PDF in HTML?

AmitDiwan

AmitDiwan

Updated on 06-Dec-2022 10:09:31

2K+ Views

To embed a PDF in HTML is an easy task and there are various ways. Let us see them one by one. Embed PDF in HTML using iframe. Embed PDF in HTML using the embed tag. Embed PDF in HTML using the object tag. Embed PDF in HTML ... Read More

How to disable Google Chrome autofill option?

AmitDiwan

AmitDiwan

Updated on 06-Dec-2022 10:01:12

4K+ Views

To disable autofill option specially on Google Chrome, use the autocomplete attribute and set it to − autocomplete="chrome-off" We will see an HTML form and for the fields we will disable the autofill, first for the form − Now, disable the autofill ... Read More

How do you keep parents of floated elements from collapsing in CSS?

AmitDiwan

AmitDiwan

Updated on 06-Dec-2022 09:56:24

133 Views

To prevent parents of floated elements from collapsing, first, we will try to understand what the problem is. After that, we will work around the examples i.e. How parents of floated elements collapse? Prevent parents of floated elements to collapse using the Overflow Property Prevent parents of floated elements ... Read More

How do I keep two side-by-side div elements the same height?

AmitDiwan

AmitDiwan

Updated on 06-Dec-2022 09:51:46

732 Views

We need to keep the two side-by-side div the same height, so that if more content is added to any of the div, the size of the other div matches it. The following two examples are covered − Keep two side-by-side div elements the same height using HTML Keep ... Read More

What are the implications of using "!important" in CSS?

AmitDiwan

AmitDiwan

Updated on 06-Dec-2022 09:49:22

107 Views

The !important rule overrides all previous styling rules. It is based on the concept of priority or specificity. The !important rule provides a way to make your CSS cascade. It also includes the rules that are to be applied always. A rule having the !important property will always be applied, ... Read More

How to center a "position: absolute" element?

AmitDiwan

AmitDiwan

Updated on 06-Dec-2022 09:46:14

1K+ Views

We can easily center an absolute position element horizontally and vertically in Python. For that, use the following CSS properties. For horizontal center, use the following properties − left margin-left For vertical center, use the following properties − top margin-top Horizontal center an absolute position element ... Read More

How to create a responsive custom scrollbar using CSS?

AmitDiwan

AmitDiwan

Updated on 05-Dec-2022 12:21:24

366 Views

To create a custom scrollbar, we will use the following pseudo element to create a responsive custom scrollbar using CSS − :-webkit-scrollbar Create a custom scrollbar First, set the width of the scrollbar − ::-webkit-scrollbar { width: 12px; } Set the color of the scrollbar − ... Read More

How to make horizontal line with words in the middle using CSS?

AmitDiwan

AmitDiwan

Updated on 05-Dec-2022 12:11:43

3K+ Views

With CSS, we can make horizontal line with words in the middle. Additionally, we can also make horizontal line with headings and even image. Let us see some examples − Make a horizontal line with words in the middleExample In this example, we will create a horizontal line with words ... Read More

Is wrapping a div inside an anchor tag valid code?

AmitDiwan

AmitDiwan

Updated on 05-Dec-2022 11:54:29

5K+ Views

Yes, according to HTML5 Specifications, we can place a div inside an anchor tag, for example − Another example − this now becomes a link The HTML5 allows tag to be wrapped around a ... Read More

Advertisements