HTML <figcaption> 标籤
- หน้าก่อนหน้า <fieldset>
- หน้าต่อไป <figure>
Definisyon at paggamit
<figcaption>
Ang tatak ng <figure>
Ang elemento ay nagtatag ng pamagat.
<figcaption>
Ang elemento ay maaaring ilagay sa <figure>
Ang posisyon ng unang o huling anak ng elemento.
Bilang karagdagan:
Manwal sa HTML DOM:Objeto na Figcaption
Mga halimbawa
Halimbawa 1
Ginagamit ang <figure> elemento upang tandaan ang mga larawan sa dokumento, ginagamit ang <figcaption> elemento upang tanggapin ang pamagat ng larawan:
<figure> <img src="tulip.jpg" alt="มะลิ" style="width:300px"> <figcaption>ภาพ 1 - มะลิ สกุล Liliaceae พืชยืนต้นปีต่อปี。</figcaption> </figure>
Halimbawa 2
Ginagamit ang CSS upang itakda ang estilo ng <figure> at <figcaption>:
<html> <head> <style> figure { border: 1px #cccccc solid; padding: 4px; margin: auto; } figcaption { background-color: black; color: white; font-style: italic; padding: 2px; text-align: center; } </style> </head> <body> <figure> <img src="tulip.jpg" alt="มะลิ" style="width:300px"> <figcaption>ภาพ 1 - มะลิ สกุล Liliaceae พืชยืนต้นปีต่อปี。</figcaption> </figure> </body> </html>
นิยายสัญญาติ
<figcaption>
ตามแบบภาพยังสนับสนุน นิยายสัญญาติทั่วไปใน HTML。
นิยายสัญญาติ
<figcaption>
ตามแบบภาพยังสนับสนุน นิยายสัญญาติใน HTML。
การตั้งค่า CSS โดยเริ่มต้น
โดยมากที่สุด บราวเซอร์จะแสดงค่าเริ่มต้นตามต่อไปนี้ <figcaption>
องค์ประกอบ:
figcaption { display: block; }
การสนับสนุนโปรแกรมบราวเซอร์
ตัวเลขในตารางระบุเวอร์ชั่นบราวเซอร์ที่สนับสนุนองค์ประกอบนี้อย่างเต็มที่
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
8.0 | 9.0 | 4.0 | 5.1 | 11.0 |
- หน้าก่อนหน้า <fieldset>
- หน้าต่อไป <figure>