001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.juneau.bean.html5; 018 019import org.apache.juneau.marshall.*; 020 021/** 022 * DTO for an HTML <a class="doclink" href="https://www.w3.org/TR/html5/text-level-semantics.html#the-sub-and-sup-elements"><sup></a> 023 * element. 024 * 025 * <p> 026 * The sup element represents superscript text. It is used to display text that should be rendered 027 * above the baseline, typically in a smaller font size. The sup element is commonly used for 028 * mathematical formulas, footnotes, ordinal numbers, and other annotations that need to be 029 * displayed as superscript. 030 * 031 * <h5 class='section'>Examples:</h5> 032 * <p class='bcode w800'> 033 * <jk>import static</jk> org.apache.juneau.bean.html5.HtmlBuilder.*; 034 * 035 * <jc>// Mathematical formula</jc> 036 * Sup <jv>math</jv> = <jsm>sup</jsm>( 037 * <js>"x"</js>, <jsm>sup</jsm>(<js>"2"</js>), 038 * <js>" + y"</js>, <jsm>sup</jsm>(<js>"2"</js>), 039 * <js>" = z"</js>, <jsm>sup</jsm>(<js>"2"</js>) 040 * ); 041 * 042 * <jc>// Ordinal numbers</jc> 043 * Sup <jv>ordinal</jv> = <jsm>sup</jsm>(<js>"1st"</js>, <jsm>sup</jsm>(<js>"st"</js>)); 044 * 045 * <jc>// Footnote reference</jc> 046 * Sup <jv>footnote</jv> = <jsm>sup</jsm>(<js>"1"</js>); 047 * 048 * <jc>// Superscript with styling</jc> 049 * Sup <jv>styled</jv> = <jsm>sup</jsm>(<js>"n"</js>) 050 * .class_(<js>"superscript"</js>); 051 * 052 * <jc>// Multiple superscripts</jc> 053 * Sup <jv>multiple</jv> = <jsm>sup</jsm>( 054 * <js>"A"</js>, <jsm>sup</jsm>(<js>"i,j"</js>), 055 * <js>" = B"</js>, <jsm>sup</jsm>(<js>"k"</js>) 056 * ); 057 * </p> 058 * 059 * <h5 class='section'>See Also:</h5><ul> 060 * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a> 061 * </ul> 062 */ 063@Marshalled(typeName = "sup") 064public class Sup extends HtmlElementMixed<Sup> { 065 066 /** 067 * Creates an empty {@link Sup} element. 068 */ 069 public Sup() {} 070 071 /** 072 * Creates a {@link Sup} element with the specified child nodes. 073 * 074 * @param children The child nodes. Must not be <jk>null</jk>. 075 */ 076 public Sup(Object...children) { 077 children(children); 078 } 079}