HTML / Reference / figure, figcaption
개요
- figure는 사진, 이미지, 다이어그램 등을 감싸는 테그입니다.
- figcaption은 figure 요소에 캡션을 만듭니다. figure 요소의 자식 요소이며, 제일 처음 또는 제일 마지막에 위치합니다.
예제
<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8">
<title>HTML Reference | figcaption</title>
</head>
<body>
<p>Aenean nec mollis nulla. Phasellus lacinia tempus mauris eu laoreet.</p>
<figure>
<figcaption>First Figure</figcaption>
<img src="images/img-02.png">
</figure>
<p>Aenean nec mollis nulla. Phasellus lacinia tempus mauris eu laoreet.</p>
<figure>
<img src="images/img-02.png">
<figcaption>Second Figure</figcaption>
</figure>
</body>
</html>
<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8">
<title>HTML Reference | figcaption</title>
</head>
<body>
<p>Aenean nec mollis nulla. Phasellus lacinia tempus mauris eu laoreet.</p>
<figure>
<figcaption>First Figure</figcaption>
<img src="images/img-02.png">
</figure>
<p>Aenean nec mollis nulla. Phasellus lacinia tempus mauris eu laoreet.</p>
<figure>
<img src="images/img-02.png">
<figcaption>Second Figure</figcaption>
</figure>
</body>
</html>
<!doctype html> <html lang="ko"> <head> <meta charset="utf-8"> <title>HTML Reference | figcaption</title> </head> <body> <p>Aenean nec mollis nulla. Phasellus lacinia tempus mauris eu laoreet.</p> <figure> <figcaption>First Figure</figcaption> <img src="images/img-02.png"> </figure> <p>Aenean nec mollis nulla. Phasellus lacinia tempus mauris eu laoreet.</p> <figure> <img src="images/img-02.png"> <figcaption>Second Figure</figcaption> </figure> </body> </html>