HTML <ins>แท็ก
ตัวอย่าง
ข้อความที่มีส่วนที่ถูกลบและส่วนที่แทรกใหม่:
<p>My favorite color is <del>blue</del> <ins>red</ins>!</p>
ความหมายและการใช้งาน
แท็ ก<ins>
กำหนดข้อความที่ถูกแทรกลงในเอกสาร เบราว์เซอร์มักจะขีดเส้นใต้ข้อความที่แทรก
เคล็ดลับ:ดู แท็ก <del>เพื่อมาร์กอัปข้อความที่ถูกลบด้วย
รองรับเบราว์เซอร์
Element | |||||
---|---|---|---|---|---|
<ins> | Yes | Yes | Yes | Yes | Yes |
คุณลักษณะ
Attribute | Value | Description |
---|---|---|
cite | URL | Specifies a URL to a document that explains the reason why the text was inserted/changed |
datetime | YYYY-MM-DDThh:mm:ssTZD | Specifies the date and time when the text was inserted/changed |
คุณสมบัติสากล
แท็ก <ins> ยังสนับสนุนGlobal Attributes ใน HTML
คุณสมบัติของเหตุการณ์
แท็ ก<ins>
ยังสนับสนุนแอตทริบิวต์เหตุการณ์ใน HTML
ตัวอย่างเพิ่มเติม
ตัวอย่าง
ใช้ CSS เพื่อจัดรูปแบบ <del> และ <ins>:
<html>
<head>
<style>
del {background-color:
tomato;}
ins {background-color: yellow;}
</style>
</head>
<body>
<p>My favorite color is <del>blue</del> <ins>red</ins>!</p>
</body>
</html>
หน้าที่เกี่ยวข้อง
การอ้างอิง HTML DOM: Ins Object
การตั้งค่า CSS เริ่มต้น
เบราว์เซอร์ส่วนใหญ่จะแสดง<ins>
องค์ประกอบด้วยค่าเริ่มต้นดังต่อไปนี้:
ตัวอย่าง
ins {
text-decoration: underline;
}