Dhl Dimensional Weight Calculator Kg

DHL Dimensional Weight Calculator (KG) – Calculate Shipping Costs Accurately :root { –primary-color: #004a99; –success-color: #28a745; –background-color: #f8f9fa; –text-color: #333; –border-color: #ddd; –input-bg: #fff; –shadow-color: rgba(0, 0, 0, 0.1); } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: var(–background-color); color: var(–text-color); margin: 0; padding: 0; line-height: 1.6; display: flex; flex-direction: column; align-items: center; } .container { width: 95%; max-width: 980px; margin: 20px auto; background-color: #fff; padding: 25px; border-radius: 8px; box-shadow: 0 4px 15px var(–shadow-color); display: flex; flex-direction: column; align-items: center; } h1, h2, h3 { color: var(–primary-color); text-align: center; } h1 { font-size: 2.2em; margin-bottom: 15px; } h2 { font-size: 1.8em; margin-top: 30px; margin-bottom: 15px; } h3 { font-size: 1.4em; margin-top: 20px; margin-bottom: 10px; } .calculator-section { width: 100%; max-width: 700px; margin-bottom: 30px; padding: 20px; border: 1px solid var(–border-color); border-radius: 8px; background-color: var(–input-bg); } .input-group { margin-bottom: 20px; width: 100%; } .input-group label { display: block; margin-bottom: 8px; font-weight: bold; color: var(–primary-color); } .input-group input[type="number"], .input-group input[type="text"], .input-group select { width: calc(100% – 20px); padding: 10px; border: 1px solid var(–border-color); border-radius: 4px; font-size: 1em; background-color: var(–input-bg); } .input-group input:focus, .input-group select:focus { outline: none; border-color: var(–primary-color); box-shadow: 0 0 0 3px rgba(0, 74, 153, 0.2); } .input-group .helper-text { font-size: 0.85em; color: #666; margin-top: 5px; display: block; } .error-message { color: #dc3545; font-size: 0.85em; margin-top: 5px; display: none; /* Hidden by default */ min-height: 1.2em; } .button-group { display: flex; justify-content: center; gap: 15px; margin-top: 25px; } button { padding: 12px 25px; border: none; border-radius: 5px; cursor: pointer; font-size: 1.1em; font-weight: bold; transition: background-color 0.3s ease, transform 0.2s ease; } button.primary { background-color: var(–primary-color); color: white; } button.primary:hover { background-color: #003366; transform: translateY(-2px); } button.secondary { background-color: #6c757d; color: white; } button.secondary:hover { background-color: #5a6268; transform: translateY(-2px); } button.copy { background-color: var(–success-color); color: white; } button.copy:hover { background-color: #218838; transform: translateY(-2px); } #results-container { margin-top: 30px; padding: 25px; background-color: #eef5ff; border: 1px solid #cce0ff; border-radius: 8px; width: 100%; box-sizing: border-box; text-align: center; display: none; /* Hidden by default */ } #results-container h3 { color: var(–primary-color); margin-top: 0; } .result-item { margin-bottom: 15px; font-size: 1.1em; } .result-item strong { color: var(–primary-color); } #main-result { font-size: 1.8em; font-weight: bold; color: var(–success-color); background-color: #e0f7fa; padding: 15px; border-radius: 5px; margin-bottom: 20px; display: inline-block; } #formula-explanation { font-size: 0.9em; color: #555; margin-top: 15px; text-align: left; padding: 10px; background-color: #f1f8ff; border-left: 4px solid var(–primary-color); } .table-caption, .chart-caption { font-size: 0.9em; color: #666; margin-top: 10px; margin-bottom: 10px; text-align: center; } table { width: 100%; border-collapse: collapse; margin-top: 20px; box-shadow: 0 2px 5px var(–shadow-color); } th, td { padding: 12px 15px; border: 1px solid var(–border-color); text-align: left; } th { background-color: var(–primary-color); color: white; font-weight: bold; } tbody tr:nth-child(even) { background-color: #f2f8ff; } canvas { display: block; margin: 20px auto; max-width: 100%; border: 1px solid var(–border-color); border-radius: 5px; } .article-content { width: 100%; max-width: 980px; margin: 30px auto; padding: 20px; background-color: #fff; border-radius: 8px; box-shadow: 0 4px 15px var(–shadow-color); text-align: left; } .article-content h2, .article-content h3 { text-align: left; margin-top: 30px; } .article-content p, .article-content ul, .article-content ol { margin-bottom: 15px; } .article-content li { margin-bottom: 8px; } .faq-item { margin-bottom: 15px; } .faq-item strong { cursor: pointer; color: var(–primary-color); display: block; margin-bottom: 5px; } .faq-item p { margin-left: 15px; display: none; /* Hidden by default */ border-left: 2px solid var(–primary-color); padding-left: 10px; } a { color: var(–primary-color); text-decoration: none; } a:hover { text-decoration: underline; } .internal-links-section { margin-top: 30px; padding: 20px; background-color: #f1f8ff; border: 1px solid #cce0ff; border-radius: 5px; } .internal-links-section ul { list-style: none; padding: 0; } .internal-links-section li { margin-bottom: 10px; } .internal-links-section a { font-weight: bold; } .internal-links-section p { font-size: 0.9em; margin-left: 15px; color: #555; } /* Responsive Adjustments */ @media (max-width: 768px) { .container { width: 90%; padding: 15px; } h1 { font-size: 1.8em; } h2 { font-size: 1.5em; } h3 { font-size: 1.2em; } button { padding: 10px 20px; font-size: 1em; } .calculator-section, .article-content { padding: 15px; } }

DHL Dimensional Weight Calculator (KG)

Accurately calculate your DHL shipment's dimensional weight in kilograms to ensure correct pricing and avoid unexpected surcharges.

Calculate Dimensional Weight

Enter the longest dimension of your parcel in centimeters.
Enter the second longest dimension of your parcel in centimeters.
Enter the shortest dimension of your parcel in centimeters.
Enter the actual weight of your parcel in kilograms.

Your Shipping Weight Calculation

Dimensional Weight: 0 kg
Actual Weight: 0 kg
Calculated Volumetric Weight: 0 kg
Billable Weight (Higher of Actual or Volumetric): 0 kg
Formula Used:
Dimensional Weight (kg) = (Length (cm) × Width (cm) × Height (cm)) / Divisor
The standard DHL divisor for dimensions in centimeters is 5000.
Billable Weight is the greater value between Actual Weight and Dimensional Weight.
DHL Dimensional Weight Calculation Comparison
Metric Value Unit
Length 0 cm
Width 0 cm
Height 0 cm
Actual Weight 0 kg
Calculated Dimensional Weight 0 kg
Billable Weight 0 kg
Actual vs. Billable Weight

What is DHL Dimensional Weight Calculator (KG)?

The DHL Dimensional Weight Calculator (KG) is a crucial online tool designed to help businesses and individuals determine the 'volumetric weight' or 'dimensional weight' of their packages when shipping with DHL Express. Unlike traditional shipping methods that solely rely on the actual physical weight of a package, carriers like DHL also consider the space a package occupies. This is particularly important for light but bulky items. The calculator converts package dimensions (length, width, height) into a cubic weight equivalent, measured in kilograms (kg), using a specific industry-standard divisor. The higher of the actual weight or the dimensional weight is then used to calculate the shipping cost, known as the billable weight. Understanding and accurately calculating this dimensional weight is vital for accurate shipping quotes and avoiding unexpected charges on your DHL shipments. This tool simplifies that process, ensuring you have a clear understanding of how your DHL shipping costs are determined.

Who Should Use It:

  • E-commerce businesses shipping physical goods internationally.
  • Small and medium-sized enterprises (SMEs) regularly sending parcels.
  • Individuals sending gifts or packages overseas.
  • Logistics managers and shipping departments needing precise cost estimations.
  • Anyone looking to optimize their shipping expenses with DHL.

Common Misconceptions:

  • "Dimensional weight only applies to very large items." While it affects bulky items more significantly, even moderately sized packages can have a dimensional weight higher than their actual weight.
  • "The divisor is the same everywhere." DHL uses specific divisors, which can vary slightly by region or service type, but 5000 is a widely used standard for cm/kg. Always confirm with DHL if unsure.
  • "My package is light, so it's cheap." Not necessarily. If the package is large and takes up significant space on the transport vehicle, its dimensional weight could drive up the cost substantially.
  • "It's too complicated to calculate." That's why tools like this DHL Dimensional Weight Calculator (KG) exist – to make the process simple and transparent.

DHL Dimensional Weight Calculator (KG) Formula and Mathematical Explanation

The core of the DHL Dimensional Weight Calculator (KG) lies in a straightforward formula that converts the physical dimensions of a package into an equivalent weight based on space utilization. This ensures that DHL is compensated for the volume occupied in their aircraft and vehicles, not just the mass.

The Standard Formula:

Dimensional Weight (kg) = (Length × Width × Height) / Divisor

Where:

  • Length (L): The longest dimension of the parcel.
  • Width (W): The second longest dimension of the parcel.
  • Height (H): The shortest dimension of the parcel.
  • Divisor: A constant value set by the shipping carrier. For DHL, when dimensions are in centimeters (cm), the commonly used divisor is 5000. If dimensions were in inches, the divisor would typically be 139 (for pounds). This calculator uses the cm/5000 standard.

Step-by-Step Derivation:

  1. Measure the Length, Width, and Height of your package in centimeters. Ensure you measure the longest side as Length, the next longest as Width, and the shortest as Height.
  2. Calculate the volume of the package by multiplying these three dimensions: Volume = Length × Width × Height. The resulting unit will be cubic centimeters (cm³).
  3. Divide the calculated volume by the DHL divisor (5000 for cm/kg). This gives you the Dimensional Weight in kilograms (kg).
  4. Compare this Dimensional Weight with the Actual Weight of the package (measured in kg).
  5. The Billable Weight is the greater of the two values (Actual Weight or Dimensional Weight). This is the weight DHL uses to determine your shipping cost.

Variables Explained:

Variable Meaning Unit Typical Range/Value
Length Longest dimension of the parcel cm ≥ 0.1 cm
Width Second longest dimension of the parcel cm ≥ 0.1 cm
Height Shortest dimension of the parcel cm ≥ 0.1 cm
Actual Weight The measured weight of the package kg ≥ 0.1 kg
Divisor Carrier-defined factor to convert volume to weight (cm³/kg) 5000 (for cm/kg with DHL)
Dimensional Weight Calculated weight based on package volume kg Calculated value
Billable Weight The weight used for shipping cost calculation kg Max(Actual Weight, Dimensional Weight)

Practical Examples (Real-World Use Cases)

Let's illustrate how the DHL Dimensional Weight Calculator (KG) works with real-world scenarios:

Example 1: Shipping Lightweight but Bulky Items

An e-commerce seller needs to ship a large, empty plush toy.

  • Dimensions: Length = 60 cm, Width = 50 cm, Height = 40 cm
  • Actual Weight: 8 kg
Using the DHL Dimensional Weight Calculator (KG):
  • Volume = 60 cm × 50 cm × 40 cm = 120,000 cm³
  • Dimensional Weight = 120,000 cm³ / 5000 = 24 kg
Comparison:
  • Actual Weight = 8 kg
  • Dimensional Weight = 24 kg
Billable Weight: The greater value is 24 kg.

Interpretation: Even though the plush toy only weighs 8 kg, it occupies significant space. DHL will charge based on the billable weight of 24 kg. This highlights the importance of the DHL Dimensional Weight Calculator (KG) for accurately estimating costs for such items.

Example 2: Shipping a Dense, Compact Item

A customer sends a small, heavy piece of machinery.

  • Dimensions: Length = 30 cm, Width = 20 cm, Height = 15 cm
  • Actual Weight: 25 kg
Using the DHL Dimensional Weight Calculator (KG):
  • Volume = 30 cm × 20 cm × 15 cm = 9,000 cm³
  • Dimensional Weight = 9,000 cm³ / 5000 = 1.8 kg
Comparison:
  • Actual Weight = 25 kg
  • Dimensional Weight = 1.8 kg
Billable Weight: The greater value is 25 kg.

Interpretation: In this case, the actual weight (25 kg) is significantly higher than the dimensional weight (1.8 kg). DHL will use the actual weight for billing. The DHL Dimensional Weight Calculator (KG) confirms that the cost will be based on the physical mass, not the space it occupies.

How to Use This DHL Dimensional Weight Calculator (KG)

Using this DHL Dimensional Weight Calculator (KG) is simple and takes just a few moments. Follow these steps:

  1. Measure Your Package: Carefully measure the Length, Width, and Height of your package in centimeters (cm). Identify the longest side as 'Length', the second longest as 'Width', and the shortest as 'Height'.
  2. Weigh Your Package: Use an accurate scale to determine the Actual Weight of your package in kilograms (kg).
  3. Enter Dimensions and Weight: Input the measured Length (cm), Width (cm), Height (cm), and the Actual Weight (kg) into the corresponding fields in the calculator above.
  4. Click 'Calculate': Press the 'Calculate' button.
  5. Review Results: The calculator will instantly display:
    • Dimensional Weight: The calculated volumetric weight in kg.
    • Actual Weight: The weight you entered.
    • Billable Weight: The higher of the two weights, which determines your shipping cost.
    • A detailed table summarizing all values.
    • A visual comparison chart.
  6. Use for Quotes: The 'Billable Weight' is the key figure you'll use when obtaining shipping quotes from DHL or comparing service levels.
  7. Reset or Copy: Use the 'Reset' button to clear the fields and start over. Use the 'Copy Results' button to easily transfer the calculated values for your records or other applications.

Decision-Making Guidance: By comparing your actual weight against the dimensional weight, you can gain insights into optimizing your packaging. For bulky, light items, consider using smaller boxes if possible. For dense, heavy items, ensure your packaging is robust enough.

Key Factors That Affect DHL Dimensional Weight Results

While the dimensional weight calculation itself is straightforward, several factors influence the final billable weight and, consequently, the shipping cost. Understanding these is crucial for effective shipping management.

  1. Package Dimensions (L x W x H): This is the most direct factor. Larger dimensions directly increase the calculated dimensional weight. Meticulous measurement is key.
  2. DHL's Divisor (5000 for cm/kg): This value is the standard for DHL when using metric units. A smaller divisor would result in a higher dimensional weight, and vice-versa. It's a critical component of the calculation and is standardized by DHL for consistency.
  3. Actual Weight: The physical mass of the package is equally important. The billable weight is always the *greater* of the actual or dimensional weight. A very heavy item might still be billed by its actual weight, regardless of its size.
  4. Packaging Materials: While not directly in the formula, the choice of packaging can affect dimensions. Overly large boxes for small items will inflate dimensional weight. Choosing appropriately sized, yet protective, packaging is essential for cost efficiency.
  5. Service Level: While the dimensional weight formula remains consistent, the per-kilogram rates for different DHL services (e.g., Express Worldwide, Express 9:00) will vary significantly. The billable weight is applied to these varying rates.
  6. Destination Country: Shipping rates are heavily influenced by the destination. A higher dimensional weight shipped to a more distant or expensive zone will result in a much higher overall shipping cost compared to the same weight shipped domestically or to a nearby zone.
  7. Fuel Surcharges & Other Fees: DHL shipments are often subject to additional surcharges (e.g., fuel, remote area delivery, high-density charge for very heavy items). These are calculated based on the final billable weight and other factors, adding to the total cost beyond just the base rate.
  8. Currency Exchange Rates: For international shipments, currency fluctuations can affect the final cost when converted to your local currency, even if the dimensional weight calculation remains the same.

Frequently Asked Questions (FAQ)

What is the DHL divisor for dimensional weight in kg?

For DHL, when dimensions are measured in centimeters (cm), the standard divisor used to calculate dimensional weight is 5000. So, the formula is: (Length cm × Width cm × Height cm) / 5000 = Dimensional Weight in kg.

How do I measure the dimensions correctly for DHL?

Measure the length (longest side), width (second longest side), and height (shortest side) of the package in centimeters. Ensure the measurements are taken from the outer surface of the packaging.

What if my package dimensions are in inches?

If your dimensions are in inches, you would typically convert them to centimeters first (1 inch = 2.54 cm) and then use the 5000 divisor. Alternatively, some carriers use a divisor of 139 for inches/pounds. For DHL, it's best to convert to cm and use 5000 for consistency.

Does DHL charge dimensional weight for all shipments?

Yes, DHL applies dimensional weight considerations to most of its express and international services. They charge the greater of the actual weight or the dimensional weight (billable weight).

Can I influence my dimensional weight?

Yes, by using the smallest possible box that adequately protects your item, you can minimize the dimensions and thus potentially lower the dimensional weight and associated shipping costs.

Is the dimensional weight divisor the same for all carriers?

No. While 5000 (for cm/kg) is common, other carriers might use different divisors. FedEx, for example, also uses 5000. UPS uses 5000 for metric and 139 for imperial. It's crucial to check the specific carrier's policy.

What happens if the dimensional weight is much higher than the actual weight?

You will be charged based on the dimensional weight. This means shipping light but bulky items can be significantly more expensive than shipping small, heavy items. This is why using this DHL Dimensional Weight Calculator (KG) is essential for budgeting.

Where can I find the official DHL dimensional weight policy?

You can find the most up-to-date information on DHL's official website, typically in their 'Services', 'Shipping Information', or 'Help' sections. It's always recommended to consult their latest guidelines for precise details.

How does this calculator help me save money?

By accurately calculating your shipment's billable weight beforehand, you can obtain more precise shipping quotes, avoid surprise charges upon delivery, and make informed decisions about packaging to potentially reduce costs, especially for bulky items.

© 2023 Your Company Name. All rights reserved.

// Global variables for chart data var chartData = { labels: ['Actual Weight', 'Billable Weight'], datasets: [{ label: 'Weight (kg)', data: [0, 0], backgroundColor: ['rgba(0, 74, 153, 0.6)', 'rgba(40, 167, 69, 0.6)'], borderColor: ['rgba(0, 74, 153, 1)', 'rgba(40, 167, 69, 1)'], borderWidth: 1 }] }; var weightChartInstance = null; function validateInput(id, min, max, message) { var input = document.getElementById(id); var errorElement = document.getElementById(id + '-error'); var value = parseFloat(input.value); errorElement.style.display = 'none'; // Hide error by default if (isNaN(value)) { errorElement.innerText = 'Please enter a valid number.'; errorElement.style.display = 'block'; return false; } if (value max) { errorElement.innerText = 'Value cannot exceed ' + max + '.'; errorElement.style.display = 'block'; return false; } return true; } function calculateDhlDimensionalWeight() { var length = document.getElementById('length'); var width = document.getElementById('width'); var height = document.getElementById('height'); var actualWeightInput = document.getElementById('actualWeight'); var errors = false; if (!validateInput('length', 0.1, undefined, 'Length must be at least 0.1 cm')) errors = true; if (!validateInput('width', 0.1, undefined, 'Width must be at least 0.1 cm')) errors = true; if (!validateInput('height', 0.1, undefined, 'Height must be at least 0.1 cm')) errors = true; if (!validateInput('actualWeight', 0.1)) errors = true; if (errors) { return; // Stop calculation if validation fails } var l = parseFloat(length.value); var w = parseFloat(width.value); var h = parseFloat(height.value); var actualWeight = parseFloat(actualWeightInput.value); var divisor = 5000; // DHL divisor for cm/kg var volumetricWeight = (l * w * h) / divisor; var billableWeight = Math.max(actualWeight, volumetricWeight); // Display main result document.getElementById('main-result').querySelector('span').innerText = billableWeight.toFixed(2); // Display intermediate results document.getElementById('displayActualWeight').innerText = actualWeight.toFixed(2); document.getElementById('displayVolumetricWeight').innerText = volumetricWeight.toFixed(2); document.getElementById('displayBillableWeight').innerText = billableWeight.toFixed(2); // Update table document.getElementById('table-length').innerText = l.toFixed(1); document.getElementById('table-width').innerText = w.toFixed(1); document.getElementById('table-height').innerText = h.toFixed(1); document.getElementById('table-actual-weight').innerText = actualWeight.toFixed(2); document.getElementById('table-volumetric-weight').innerText = volumetricWeight.toFixed(2); document.getElementById('table-billable-weight').innerText = billableWeight.toFixed(2); // Update chart chartData.datasets[0].data = [actualWeight, billableWeight]; if (weightChartInstance) { weightChartInstance.update(); } else { initializeChart(); } // Show results container document.getElementById('results-container').style.display = 'block'; } function resetDhlCalculator() { document.getElementById('length').value = '50'; document.getElementById('width').value = '40'; document.getElementById('height').value = '30'; document.getElementById('actualWeight').value = '10'; // Clear errors var errorElements = document.querySelectorAll('.error-message'); for (var i = 0; i < errorElements.length; i++) { errorElements[i].style.display = 'none'; errorElements[i].innerText = ''; } // Reset results display document.getElementById('main-result').querySelector('span').innerText = '0.00'; document.getElementById('displayActualWeight').innerText = '0.00'; document.getElementById('displayVolumetricWeight').innerText = '0.00'; document.getElementById('displayBillableWeight').innerText = '0.00'; // Reset table document.getElementById('table-length').innerText = '0.0'; document.getElementById('table-width').innerText = '0.0'; document.getElementById('table-height').innerText = '0.0'; document.getElementById('table-actual-weight').innerText = '0.00'; document.getElementById('table-volumetric-weight').innerText = '0.00'; document.getElementById('table-billable-weight').innerText = '0.00'; // Reset chart data if (weightChartInstance) { chartData.datasets[0].data = [0, 0]; weightChartInstance.update(); } document.getElementById('results-container').style.display = 'none'; } function copyToClipboard(text) { var textArea = document.createElement("textarea"); textArea.value = text; textArea.style.position = "fixed"; // Avoid scrolling to bottom textArea.style.left = "-9999px"; textArea.style.top = "-9999px"; document.body.appendChild(textArea); textArea.focus(); textArea.select(); try { var successful = document.execCommand('copy'); // Optional: Provide user feedback // alert(successful ? 'Copied!' : 'Failed to copy!'); } catch (err) { // Optional: Provide user feedback // alert('Fallback: Oops, unable to copy'); } document.body.removeChild(textArea); } function copyResults() { var length = document.getElementById('length').value; var width = document.getElementById('width').value; var height = document.getElementById('height').value; var actualWeight = document.getElementById('actualWeight').value; var mainResult = document.getElementById('main-result').querySelector('span').innerText; var displayVolumetricWeight = document.getElementById('displayVolumetricWeight').innerText; var displayBillableWeight = document.getElementById('displayBillableWeight').innerText; var copyText = "— DHL Dimensional Weight Calculation —" + "\n"; copyText += "Length: " + length + " cm\n"; copyText += "Width: " + width + " cm\n"; copyText += "Height: " + height + " cm\n"; copyText += "Actual Weight: " + actualWeight + " kg\n"; copyText += "—————————————-\n"; copyText += "Calculated Dimensional Weight: " + displayVolumetricWeight + " kg\n"; copyText += "Billable Weight (Chargeable): " + displayBillableWeight + " kg\n"; copyText += "Main Result (Billable Weight): " + mainResult + " kg\n"; copyText += "\nKey Assumption: DHL Divisor = 5000 (for cm/kg)"; copyToClipboard(copyText); alert('Results copied to clipboard!'); } function initializeChart() { var ctx = document.getElementById('weightComparisonChart').getContext('2d'); weightChartInstance = new Chart(ctx, { type: 'bar', // Use 'bar' for comparison data: chartData, options: { responsive: true, maintainAspectRatio: false, scales: { y: { beginAtZero: true, title: { display: true, text: 'Weight (kg)' } } }, plugins: { legend: { display: true, position: 'top', }, title: { display: true, text: 'Comparison: Actual vs. Billable Weight' } } } }); } // Add event listeners for real-time updates document.getElementById('length').addEventListener('input', calculateDhlDimensionalWeight); document.getElementById('width').addEventListener('input', calculateDhlDimensionalWeight); document.getElementById('height').addEventListener('input', calculateDhlDimensionalWeight); document.getElementById('actualWeight').addEventListener('input', calculateDhlDimensionalWeight); // Initial calculation on load (with default values) document.addEventListener('DOMContentLoaded', function() { calculateDhlDimensionalWeight(); // Initialize the chart on page load var canvas = document.getElementById('weightComparisonChart'); if(canvas){ var ctx = canvas.getContext('2d'); // Ensure chartData is initialized before creating chart if(chartData.datasets[0].data[0] === 0 && chartData.datasets[0].data[1] === 0){ // Initialize with zeros if no calculation has happened yet chartData.datasets[0].data = [parseFloat(document.getElementById('actualWeight').value), parseFloat(document.getElementById('actualWeight').value)]; // Set to initial actual weight to avoid NaN if calculation hasn't run } initializeChart(); } }); // FAQ toggle functionality var faqItems = document.querySelectorAll('.faq-item strong'); for (var i = 0; i < faqItems.length; i++) { faqItems[i].addEventListener('click', function() { var p = this.nextElementSibling; if (p.style.display === 'block') { p.style.display = 'none'; } else { p.style.display = 'block'; } }); }

Leave a Comment