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">&lt;sub&gt;</a>
023 * element.
024 *
025 * <p>
026 * The sub element represents subscript text. It is used to display text that should be rendered
027 * below the baseline, typically in a smaller font size. The sub element is commonly used for
028 * mathematical formulas, chemical formulas, footnotes, and other annotations that need to be
029 * displayed as subscript.
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>// Chemical formula</jc>
036 *    Sub <jv>chemical</jv> = <jsm>sub</jsm>(<js>"H"</js>, <jsm>sub</jsm>(<js>"2"</js>), <js>"O"</js>);
037 *
038 *    <jc>// Mathematical formula</jc>
039 *    Sub <jv>math</jv> = <jsm>sub</jsm>(
040 *       <js>"x"</js>, <jsm>sub</jsm>(<js>"2"</js>),
041 *       <js>" + y"</js>, <jsm>sub</jsm>(<js>"2"</js>),
042 *       <js>" = z"</js>, <jsm>sub</jsm>(<js>"2"</js>)
043 *    );
044 *
045 *    <jc>// Footnote reference</jc>
046 *    Sub <jv>footnote</jv> = <jsm>sub</jsm>(<js>"1"</js>);
047 *
048 *    <jc>// Subscript with styling</jc>
049 *    Sub <jv>styled</jv> = <jsm>sub</jsm>(<js>"n"</js>)
050 *       .class_(<js>"subscript"</js>);
051 *
052 *    <jc>// Multiple subscripts</jc>
053 *    Sub <jv>multiple</jv> = <jsm>sub</jsm>(
054 *       <js>"A"</js>, <jsm>sub</jsm>(<js>"i,j"</js>),
055 *       <js>" = B"</js>, <jsm>sub</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 = "sub")
064public class Sub extends HtmlElementMixed<Sub> {
065
066   /**
067    * Creates an empty {@link Sub} element.
068    */
069   public Sub() {}
070
071   /**
072    * Creates a {@link Sub} element with the specified child nodes.
073    *
074    * @param children The child nodes. Must not be <jk>null</jk>.
075    */
076   public Sub(Object...children) {
077      children(children);
078   }
079}