Оновлено: 19.05.2025

figcaption

figcaption>

Містить опис елемента <figure>. <figcaption> (від англ. figure caption - підпис до малюнка) повинен бути першим або останнім елементом у групі.

 

 

Синтаксис

<figure> <figcaption>Опис</figcaption> </figure>

 

 

Закриваючий тег

Обов'язковий.
 

 

 

Атрибути

Немає.

 

 

Приклад

<!DOCTYPE html>
<html>
 <head>
  <metacharset="utf-8">
  <title>FIGCAPTION</title>
    <base href="https://assets.ithillel.ua/images/wiki/">
  <style>
   figure {
    background: #d9dabb; /* Background color */
    display:block; /* block element */
    width: 150px /* Width */
    height: 190px; /* Height */
    float: left; /* Blocks line up horizontally */
    margin: 0 10px 10px 0; /* Indentation */
    text-align: center; /* Center alignment */
   }
   figure img {
    border: 2px solid #8b8e4b; /* Frame options */
   }
   figure p {
    margin-bottom: 0 /* Bottom padding */
   }
  </style>
 </head>
 <body>
  <article>
   <figure>
    <p><img src="gallery/thumb3.jpg" alt=""></p>
    <figcaption>Merchant Club</figcaption>
   </figure>
   <figure>
    <p><img src="gallery/thumb4.jpg" alt=""></p>
    <figcaption>Monument to St. Vladimir</figcaption>
   </figure>
 </article>
 </body>
</html>