Class Mark


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

The mark element represents a run of text in one document marked or highlighted for reference purposes, due to its relevance in another context. It is used to mark up text that should be highlighted or emphasized, such as search results, important passages, or text that needs attention. The mark element is typically rendered with a yellow background or other highlighting to make the marked text stand out from the surrounding content.

Examples:

import static org.apache.juneau.bean.html5.HtmlBuilder.*; // Simple marked text Mark simple = mark("This text is highlighted"); // Mark with styling Mark styled = mark("Styled highlighted text") ._class("highlight"); // Mark with complex content Mark complex = mark( "The ", strong("important"), " information is highlighted." ); // Mark with ID Mark withId = mark("Text with ID") .id("highlighted-text"); // Mark with styling Mark styled2 = mark("Custom styled highlighted text") .style("background-color: #ffeb3b; color: #000; padding: 2px 4px;"); // Mark with multiple elements Mark multiple = mark( "The ", mark("key points"), " are ", mark("highlighted"), " for emphasis." ); // Mark with links Mark withLinks = mark( "See ", a("/search", "search results"), " for more information." );

See Also: