ตัวดำเนินการทางคณิตศาสตร์ HTML5 ใช้สำหรับการแสดงตัวดำเนินการทางคณิตศาสตร์และทางเทคนิคในเอกสาร HTML ดังนั้น ในการใช้ตัวดำเนินการดังกล่าวกับหน้าเว็บ เราใช้ชื่อเอนทิตี HTML หากไม่มีชื่อเอนทิตี คุณสามารถใช้หมายเลขเอนทิตีซึ่งเป็นการอ้างอิงทศนิยมหรือเลขฐานสิบหกได้
ไวยากรณ์
ต่อไปนี้เป็นไวยากรณ์ -
&operatorName;
หรือ
&#operatorHexcode;
หรือ
&#operatorHexadecimalcode;
ให้เราดูตัวอย่างของตัวดำเนินการทางคณิตศาสตร์ HTML5 -
ตัวอย่าง
<!DOCTYPE html>
<html>
<style>
body {
color: #000;
height: 100vh;
background-color: #8BC6EC;
background-image: linear-gradient(135deg, #8BC6EC 0%, #9599E2 100%);
text-align: center;
}
</style>
<body>
<h1>HTML5 Mathematical Operator Demo</h1>
<p>Some Mathematical Symbols</p>
<p>− -- minus sign</p>
<p>° -- degree sign</p>
<p>∑ -- sigma sign</p>
<p>> -- greater than sign</p>
<p>≥ -- greater than or equal to sign</p>
<p>< -- less than sign</p>
<p>≤ -- less than or equal to sign</p>
<p>∫ -- integration sign</p>
</body>
</html> ผลลัพธ์
