Class Em


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

The em element represents stress emphasis of its contents. It is used to mark up text that should be emphasized or stressed, typically rendered in italics by browsers. The em element indicates that the text has semantic importance and should be read with emphasis, making it different from purely stylistic italic text. It is commonly used to emphasize words or phrases within sentences to change the meaning or add emphasis to the content.

Examples:

import static org.apache.juneau.bean.html5.HtmlBuilder.*; // Simple emphasis Em simple = em("important"); // Emphasis with styling Em styled = em("critical") ._class("highlight"); // Emphasis in a sentence P sentence = p( "This is ", em("very important"), " information." ); // Emphasis with complex content Em complex = em( "must", span()._class("not").children(" not"), " be ignored" ); // Emphasis with links Em withLinks = em( "Please read the ", a("/manual", "manual"), " carefully." ); // Emphasis with ID Em withId = em("Warning: This action cannot be undone.") .id("warning-text"); // Emphasis with styling Em styled2 = em("Error: Invalid input") .style("color: red; font-weight: bold;");

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

See Also: