Class S


@Marshalled(typeName="s") public class S extends HtmlElementMixed<S>
DTO for an HTML <s> element.

The s element represents contents that are no longer accurate or no longer relevant. It is used to mark up text that has been struck through or crossed out, indicating that the content is outdated, incorrect, or no longer applicable. The s element is typically rendered with a line through the text (strikethrough) and is commonly used for showing price changes, outdated information, or content that has been superseded.

Examples:

import static org.apache.juneau.bean.html5.HtmlBuilder.*; // Simple strikethrough text S simple = s("This text is no longer accurate"); // S with styling S styled = s("This information is outdated") .class_("outdated"); // S with complex content S complex = s( "The ", strong("old price"), " was $100." ); // S with ID S withId = s("Text with ID") .id("strikethrough-text"); // S with styling S styled2 = s("Custom styled strikethrough text") .style("color: #999; text-decoration: line-through;"); // S with multiple elements S multiple = s( "The ", s("old version"), " has been ", s("replaced"), " by the new one." ); // S with links S withLinks = new S() .children( "See ", new A().href("/old-version").children("old documentation"), " (no longer maintained)" );

See Also:
  • Constructor Details

    • S

      public S()
      Creates an empty S element.
    • S

      public S(Object... children)
      Creates an S element with the specified child nodes.
      Parameters:
      children - The child nodes. Must not be null.