Found 2202 Articles for HTML

How to create a download link with HTML?

AmitDiwan
Updated on 08-May-2020 14:15:52

805 Views

To create a download link with HTML, the code is as follows −Example Live Demo Download Link example Click on the image above to download it OutputThe above code will produce the following output −

How to sort an HTML table using JavaScript?

AmitDiwan
Updated on 09-Nov-2023 14:46:38

2K+ Views

To sort an HTML table using JavaScript, the code is as follows − JavaScript function to sort an HTML Table Consider the following sort function using JavaScript, that will be used to sort an HTML table.   function sortTable() {     var filterTable, rows, sorted, i, x, y, sortFlag;     filterTable = document.querySelector(".filterTable");     sorted = true;     while (sorted) {      sorted = false;      rows = filterTable.rows;      for (i = 1; i < rows.length - 1; i++) { ... Read More

How to sort an HTML list using JavaScript?

AmitDiwan
Updated on 06-May-2020 14:29:47

1K+ Views

To sort an HTML list using JavaScript, the code is as follows −Example Live Demo Sorting list example Click to sort Giraffe Camel Dog Lion Cheetah Cat    document .getElementsByTagName("button")[0] .addEventListener("click", sortList);    function sortList() {       var list, i, sortFlag, LiEle, sorted;       list = document.querySelector(".animalList");       sortFlag = true;       while (sortFlag) {          sortFlag = false;          LiEle = list.getElementsByTagName("LI");          for (i = 0; i < LiEle.length - 1; i++) {         ... Read More

How to create a file upload button with HTML?

AmitDiwan
Updated on 21-Nov-2023 21:12:19

1K+ Views

To create a file on upload button with HTML, the code is as follows −Example File upload button example Click on the "Choose File" button to upload a file: OutputThe above code will produce the following output −On clicking the “Choose file” button −

How to turn off spell checking (grammar correction) for HTML form elements?

AmitDiwan
Updated on 06-May-2020 14:07:54

157 Views

To turn off spell check for form elements, the code is as follows −Example Live Demo Disabling Spellcheck Example Your Name: About Yourself Type wrong spelling in the above input field to see spellcheck in action OutputThe above code will produce the following output −On typing something in the input fields −

How to disable autocomplete of an HTML input field?

AmitDiwan
Updated on 06-May-2020 14:05:06

315 Views

To disable autocomplete of an input field, the code is as follows −Example Live Demo    input{       font-size: 18px;       padding: 10px;       margin: 10px;       border:1px solid grey;    } Autocomplete on/off Example First name: Last name: Type in the above fields and refresh page to see autocomplete at work OutputThe above code will produce the following output −On typing something in the above fields after submitting the form one time −

How to display XML in HTML in PHP?

AmitDiwan
Updated on 09-Apr-2020 11:06:47

2K+ Views

If the string is pre-formatted, and a plain text representation of the same is needed, it can be wrapped in a HTML tag and html entities can be used to escape the angle brackets. This has been shown below −The string is assigned to a string type and the above is used to show XML in HTML −Example Live DemoOutputThis will produce the following output −           EXAMPLE    

How to create a signup form with HTML and CSS?

AmitDiwan
Updated on 19-Jul-2024 13:26:37

17K+ Views

In this article, we will be understanding How to create a signup form with HTML and CSS. A sign-up form allows any new user visiting the website to register. It includes adding an email-id, password, repeat password, and clicking on the Sign-Up button to register. To allow the browser to save the password, click the Remember Me. You can also provide a Terms & Policies link so the users can first read the registration terms. Let us see how to create a signup form with HTML and CSS. Steps to Create Sign Up Form We are following 2 steps to ... Read More

Parse HTML with PHP's HTML DOMDocument

AmitDiwan
Updated on 07-Apr-2020 11:36:35

509 Views

The text inside a tag inside class="text" inside with class="main" can be obtained with the following code −Example$html = nodeValue)); }OutputThis will produce the following output −string ‘This is text 1’ (length=14) string ‘This is text 2' (length=14)

How to create a responsive Image Grid with HTML and CSS?

AmitDiwan
Updated on 08-Dec-2023 16:49:39

5K+ Views

The image grid on a web page displays images in a grid. In an outer grid, we can create inner grids. Also, the responsiveness needs to be set for the image grid for different devices. On a web browser, check the responsiveness by resizing the web browser. Let us see how to create a responsive image grid with HTML and CSS. Set the outer and inner grid A div for the outer grid is set. Within that, the inner grids are set. We have set three inner grids inside our outer grid − ... Read More

Advertisements