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-dfn-element">&lt;dfn&gt;</a>
023 * element.
024 *
025 * <p>
026 * The dfn element represents the defining instance of a term. It is used to mark up the first occurrence
027 * of a term that is being defined in the document, making it clear to both users and search engines
028 * that this is the definition of the term. The dfn element can contain the term being defined, and
029 * the definition is typically provided in the surrounding context or in a related dd element.
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>// Simple definition</jc>
036 *    Dfn <jv>simple</jv> = <jsm>dfn</jsm>(<js>"HTML"</js>);
037 *
038 *    <jc>// Definition with styling</jc>
039 *    Dfn <jv>styled</jv> = <jsm>dfn</jsm>(<js>"CSS"</js>)
040 *       .class_(<js>"term"</js>);
041 *
042 *    <jc>// Definition in a sentence</jc>
043 *    P <jv>sentence</jv> = <jsm>p</jsm>(
044 *       <js>"The "</js>,
045 *       <jsm>dfn</jsm>(<js>"DOM"</js>),
046 *       <js>" represents the structure of a web page."</js>
047 *    );
048 *
049 *    <jc>// Definition with complex content</jc>
050 *    Dfn <jv>complex</jv> = <jsm>dfn</jsm>(
051 *       <js>"JavaScript"</js>,
052 *       <jsm>span</jsm>().class_(<js>"abbrev"</js>).children(<js>" (JS)"</js>)
053 *    );
054 *
055 *    <jc>// Definition with title</jc>
056 *    Dfn <jv>withTitle</jv> = <jsm>dfn</jsm>(<js>"HTML"</js>)
057 *       .title(<js>"HyperText Markup Language"</js>);
058 *
059 *    <jc>// Definition with ID</jc>
060 *    Dfn <jv>withId</jv> = <jsm>dfn</jsm>(<js>"CSS"</js>)
061 *       .id(<js>"css-term"</js>);
062 *
063 *    <jc>// Definition with styling</jc>
064 *    Dfn <jv>styled2</jv> = <jsm>dfn</jsm>(<js>"API"</js>)
065 *       .style(<js>"font-style: italic; color: blue;"</js>);
066 * </p>
067 *
068 * <p>
069 * The following convenience methods are provided for constructing instances of this bean:
070 * <ul class='javatree'>
071 *    <li class='jc'>{@link HtmlBuilder}
072 *    <ul class='javatree'>
073 *       <li class='jm'>{@link HtmlBuilder#dfn() dfn()}
074 *       <li class='jm'>{@link HtmlBuilder#dfn(Object...) dfn(Object...)}
075 *    </ul>
076 * </ul>
077 * </p>
078 *
079 * <h5 class='section'>See Also:</h5><ul>
080 *    <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
081 * </ul>
082 */
083@Marshalled(typeName = "dfn")
084public class Dfn extends HtmlElementMixed<Dfn> {
085
086   /**
087    * Creates an empty {@link Dfn} element.
088    */
089   public Dfn() {}
090
091   /**
092    * Creates a {@link Dfn} element with the specified child nodes.
093    *
094    * @param children The child nodes.
095    */
096   public Dfn(Object...children) {
097      children(children);
098   }
099
100}