Class Figcaption


@Bean(typeName="figcaption") public class Figcaption extends HtmlElementMixed
DTO for an HTML <figcaption> element.

The figcaption element represents a caption or legend for a figure. It is used to provide a caption for the content of its parent figure element, such as images, diagrams, code snippets, or other self-contained content. The figcaption element can be placed either before or after the figure content and is typically used to provide context, attribution, or explanation for the figure.

Examples:

import static org.apache.juneau.bean.html5.HtmlBuilder.*; // Simple figure caption Figcaption simple = figcaption("A beautiful sunset over the mountains."); // Figure caption with styling Figcaption styled = figcaption("Chart showing sales data for Q1 2024.") ._class("image-caption"); // Figure caption with complex content Figcaption complex = figcaption( "Figure 1: ", strong("Web Development Process"), " - A step-by-step guide to building websites." ); // Figure caption with links Figcaption withLinks = figcaption( "Source: ", a("/data", "Company Data"), " | ", a("/methodology", "Methodology") ); // Figure caption with ID Figcaption withId = figcaption("Interactive chart showing user engagement metrics.") .id("chart-caption"); // Figure caption with styling Figcaption styled2 = figcaption("Photograph by John Doe, 2024") .style("text-align: center; font-style: italic; color: #666;"); // Figure caption with multiple elements Figcaption multiple = figcaption( "Code Example: ", code("function hello() { return 'Hello World'; }"), " - A simple JavaScript function." );

The following convenience methods are provided for constructing instances of this bean:

See Also: