Web Development Articles

Page 69 of 801

Unescape HTML entities in JavaScript?

AmitDiwan
AmitDiwan
Updated on 12-Nov-2023 1K+ Views

To unescape HTML entities in JavaScript, use the unescape() function. Let’s say you want to encode special character with the unescape() function − document.write(unescape("Demo%20Text%20")); In this article, we will see two examples − Unescape Entities Decode the Encoded String Unescape Entities Example Lo unescape, we will use the unescape() method in JavaScript. Let us see an example − DOCTYPE html> Demo Heading document.write(unescape("Demo%20Text%20")); Output Decode the Encoded String Use escape() for encoding ...

Read More

How can you set the height of an outer div to always be equal to a particular inner div?

AmitDiwan
AmitDiwan
Updated on 10-Nov-2023 2K+ Views

In this article, we will set the left-most inner div to determine the height of the outer div. Consider the following two example − Set the height of an outer div to always be equal to a particular inner div using Flex Set the height of an outer div to always be equal to a particular inner div using CSS Grid Set the height of an outer div to always be equal to a particular inner div using Flex Example Let us see the example using Flex − ...

Read More

How to sort an HTML table using JavaScript?

AmitDiwan
AmitDiwan
Updated on 09-Nov-2023 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 align an item to the flex-end in the container using CSS ?

Diksha Patro
Diksha Patro
Updated on 09-Nov-2023 2K+ Views

In CSS, the use of aligning items to the flex-end in a container using CSS is to position the items at the end of the container's main axis. This allows for more precise control over the layout of the items within the container, such as aligning items to the bottom of a header or the right side of a navigation bar. Additionally, aligning items to the flex-end can improve the overall visual design and user experience of the website or application by creating a clean and organized layout. Approaches We have three different approaches for aligning the item baseline ...

Read More

Are HTML comments inside script tags a best practice?

Bhanu Priya
Bhanu Priya
Updated on 09-Nov-2023 2K+ Views

Before trying to understanding whether HTML comments inside script tags is best practice or not, let us discuss about how to write comments in HTML, what are the different ways to comment in HTML? Generally, comments are helpful to understand the statement, it leaves remainders and provide explanations. It also helps in disabling the statement when we are testing or working on new feature. Syntax Following is the syntax for comment representation − Let us see different ways to represent comments in a program − Inserting a single-line comment The single line comment is applied to single ...

Read More

How to create Portfolio Gallery using the HTML and CSS

Aman Gupta
Aman Gupta
Updated on 09-Nov-2023 2K+ Views

Overview A portfolio gallery can be a collection of any types of photos and videos that represent the past work of the organization. To build a portfolio gallery we will use HTML and CSS. The HTML will help us in building the skeleton of the portfolio gallery and CSS is used to make the styling of the portfolio. As the portfolio will also be the main component of our website so we will make this page responsive using some CSS properties. Algorithm Step 1 − Create a HTML boilerplate on your text editor. Step 2 − Create a container ...

Read More

Remove json element - JavaScript?

AmitDiwan
AmitDiwan
Updated on 03-Nov-2023 25K+ Views

Let's say the following is our JSON string −var details = [    {       customerName: "Chris",       customerAge: 32    },    {       customerName: "David",       customerAge: 26    },    {       customerName: "Bob",       customerAge: 29    },    {       customerName: "Carol",       customerAge: 25    } ]To remove JSON element, use the delete keyword in JavaScript.ExampleFollowing is the complete code to remove JSON element −var details = [    {       customerName: "Chris",       ...

Read More

Hide Dropdown Arrow for Select Input with CSS appearance

AmitDiwan
AmitDiwan
Updated on 02-Nov-2023 2K+ Views

We use the appearance property to style an element according to the platform-native style of the user’s operating system. Syntax The syntax of CSS appearance property is as follows − Selector { appearance: /*value*/; -webkit-appearance: /*value*/; /*for Safari and Chrome */ -moz-appearance: /*value*/; /*for Firefox */ } The following examples illustrate CSS appearance property − Hide Dropdown Arrow for Input Type Number In this example, we have shown how to hide the dropdown arrow for the . For that, we gave set the appearance property to none − ...

Read More

Formatting Unordered and Ordered Lists in CSS

AmitDiwan
AmitDiwan
Updated on 02-Nov-2023 324 Views

The style and position of unordered and ordered lists can be formatted by CSS properties with list-style-type, list-style-image and list-style-position. Syntax The syntax of CSS list-style property is as follows − Selector { list-style: /*value*/ } Style Ordered List With Upper Roman Marker The following example illustrate the CSS list-style property and styles the ordered list. We have set the upper roman values for the ordered list − list-style: upper-roman; Example Let us see an example − ol ...

Read More

Fixing the Collapsed Parent using CSS

AmitDiwan
AmitDiwan
Updated on 02-Nov-2023 752 Views

One of the many problems that developers face while using CSS float property is that if all child elements are floated then the parent container will collapse. To avoid parent container collapsing we can use one of the following solutions. Problem Parent containers are collapsed as all content is floated inside them. Only the padding of container is seen due to CSS background-color property. Example FThellowing is the problem code which need rectification − Avoid Parent Container Collapse body{ ...

Read More
Showing 681–690 of 8,006 articles
« Prev 1 67 68 69 70 71 801 Next »
Advertisements