Found 2197 Articles for HTML

Explain Storage Object in HTML

Shubham Vora
Updated on 05-Jan-2023 15:47:25
As the web storage word represents, it stores the data inside the user’s browser locally. Before HTML 5, developers were using cookies to store data locally, but the cookies allow for storing a limited amount of data, such as in kilobytes. The local storage allows users to store up to 5 MB of data. Developers use the cookies to store the data in the browser and exchange it between the client and server. When we store the data in the cookies, it expires after a particular time. However, we can set the data's expiry, but it still expires after ... Read More

POST unchecked HTML checkboxes

Shubham Vora
Updated on 07-Dec-2022 10:14:03
In this tutorial, we will learn to POST unchecked HTML checkboxes. To interact with a user, it is necessary to take their input or data through the website. The HTML forms are used to take input from the user. Forms are essential to take the data of the user on the website. These forms take input from the user and send data to the server using HTTP requests. There are two types of HTTP requests one is GET, and the other is POST. The POST request is the most used type because it is secure and can send a large ... Read More

How to include another HTML file in an HTML file?

Shubham Vora
Updated on 07-Dec-2022 10:09:33
In this tutorial, we shall learn to include another HTML file in an HTML file. Various methods are available to include another HTML file in an HTML file. Let us quickly go through the techniques that have support on the web. Using JQuery load to include an HTML file In this section, we shall check how to use JQuery’s load method to include an HTML file. Users can follow the syntax below to use this method. Syntax $(wrapper).load(htmlfile); The wrapper appends the new HTML file that jQuery loads. Parameters wrapper − ID of the DOM element that includes ... Read More

How to add HTML and CSS to PDF?

Shubham Vora
Updated on 06-Dec-2022 11:39:20
In this tutorial, we will learn how we can add HTML and CSS to PDF. The HTML and CSS construct the webpages with styles and designs. We can save that webpage as a PDF file. Creating a PDF from scratch using vanilla JavaScript makes it very difficult, and the code will be lengthy. There are many libraries created upon JavaScript that will helps us to execute our task. The libraries like html2pdf, jsPDF, etc. are well-known libraries that convert webpages into pdf. These libraries can be implemented in the project using the script we are adding to the program. So, ... Read More

The min-width and max-width declaration for Flexbox doesn’t work on Safari? Why?

Updated on 06-Dec-2022 11:26:49
To make the Flexbox work on all the web browsers, use the min-width and max-width equivalents of flex. For example, for this − min-width: 40%; max-width: 40%; Use the CSS Shorthand Property. It states flex-grow | flex-shrink | flex-basis as shown in the below syntax − flex: flex-grow flex-shrink flex-basis|auto; For the above, we can set the Flex as − flex: 0 0 40%; Let us now see a Flexbox example that works on all the web browsers. We have two divs inside our parent div parentBox − ... Read More

How to append to innerHTML without destroying descendants’ event listeners with JavaScript?

Updated on 06-Dec-2022 11:21:10
Yes, it is possible to append to innerHTML without destroying descendants event listeners. Let us see an example. First, we will create two functions with JavaScript. Here’s the demoFunc() − function demoFunc() { alert("Hello"); } The function demoFunc() above will display an alert box and a message. With that, the start() function loads when you load the web page and displays “Two” with “One” in the div. Here’s the start() function. We have appended the text “One” from the div with the text “Two” using the innerHTML property − function start() { mydiv.innerHTML ... Read More

How to add images in select list in HTML?

Updated on 06-Dec-2022 11:07:47
To add images in the select list, set the img text for the image in the tag, which is enclosed in a div − Python In the above div dropText, all the other select items is placed with the individual images. The dropText div is styled as. This also sets the background color of the select items i.e. skyblue − .dropText { display: none; position: absolute; background-color: skyblue; ... Read More

HTML table with 100% width, with vertical scroll inside tbody

Updated on 06-Dec-2022 10:58:10
We will set the vertical scroll using the overflow-y property − overflow-y: auto; We will hide the horizontal scroll using the overflow-x property − overflow-x: hidden; Example Let us see an example − Display table with vertical scrollbar table.scrolldown { width: 100%; border-spacing: 0; ... Read More

Why doesn't the height of a container element increase if it contains floated elements?

Updated on 06-Dec-2022 10:34:58
To fix this use, we need to use the overflow property and set it on the outer parent div. We have an inner child div and an outer parent div − The outer parent div is set with the following CSS style. The min-height is set 100px and the overflow property is set to auto. This doesn’t let the height of the container element to increase even if it contains floated elements − .outer { margin: 0 auto; width: 960px; ... Read More

Does ID have to be unique in the whole HTML page?

Updated on 06-Dec-2022 10:31:37
Yes, IDs must be unique in the entire HTML page. Even the official HTML standards suggest the same − Unique IDs with the id attribute Example Let us see an example. Here, we have used the id attribute − #myHeader { border: 2px solid yellow; background-color: orange; padding: 50px; text-align: ... Read More
1 2 3 4 5 6 7 ... 220 Next