The script presented in this page is a tool to calculate surface area, perimeter and other dimensions (radius, diagonal, height) of various 2D geometrical shapes: circle, ellipse, triangle, hexagon, parallelogram, rectangle, rhombus, square, trapezoid.
This calculator shows also the mathematical formulas used to calculate the area, perimeter, and the other dimensions.

Calculate Area and Perimeter

JavaScript script to calculate surface area and perimeter.
Find area and perimeter of various 2d geometrical shapes.

Select an object


• To Download this script, click: Area and Perimeter Calculator.

Daily Test with Code Example

HTML
CSS
JavaScript
PHP-MySQL
Which tag renders as emphasized text, displaying the text oblique?
<strong> <pre> <em>
<p>Web development courses: <em>CoursesWeb.net</em></p>
Which CSS property defines the space between the element border and its content?
margin padding position
h3 {
  padding: 2px 0.2em;
}
Click on the method which returns the first element that matches a specified group of selectors.
getElementsByName() querySelector() querySelectorAll()
// gets first Div with class="cls", and shows its content
var elm = document.querySelector("div.cls");
alert(elm.innerHTML);
Indicate the PHP variable that contains data from a form sent with method="post".
$_SESSION $_GET $_POST
if(isset($_POST["field"])) {
  echo $_POST["field"];
}
Area and Perimeter Calculator for 2D shapes

Last accessed pages

  1. JavaScript code and PHP (22408)
  2. PhpSpreadsheet - Read, Write Excel and LibreOffice Calc files (13585)
  3. Insert, Select and Update NULL value in MySQL (33019)
  4. Get the value of the selected /checked checkboxes in a form (39727)
  5. Read Excel file data in PHP - PhpExcelReader (63527)

Popular pages this month

  1. Contact page - CoursesWeb (1638)
  2. Tabs effect with CSS (1624)
  3. Insert, Select and Update NULL value in MySQL (823)
  4. Read Excel file data in PHP - PhpExcelReader (653)
  5. PHP getElementById and getElementsByTagName (414)