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/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements">&lt;h1&gt;</a>
023 * element.
024 *
025 * <p>
026 * The h1 element represents the highest level heading in a document or section. It is used to
027 * mark up the main title or most important heading on a page. The h1 element should be used
028 * only once per page and should describe the main topic or purpose of the page. It is typically
029 * rendered in the largest font size among all heading elements and is important for both
030 * accessibility and SEO.
031 *
032 * <h5 class='section'>Examples:</h5>
033 * <p class='bcode w800'>
034 *    <jk>import static</jk> org.apache.juneau.bean.html5.HtmlBuilder.*;
035 *
036 *    <jc>// Simple page title</jc>
037 *    H1 <jv>simple</jv> = <jsm>h1</jsm>(<js>"Welcome to Our Website"</js>);
038 *
039 *    <jc>// H1 with styling</jc>
040 *    H1 <jv>styled</jv> = <jsm>h1</jsm>(<js>"About Our Company"</js>)
041 *       .class_(<js>"page-title"</js>);
042 *
043 *    <jc>// H1 with complex content</jc>
044 *    H1 <jv>complex</jv> = <jsm>h1</jsm>(
045 *       <js>"Welcome to "</js>,
046 *       <jsm>strong</jsm>(<js>"Our Company"</js>),
047 *       <js>" - "</js>,
048 *       <jsm>em</jsm>(<js>"Innovation at its finest"</js>)
049 *    );
050 *
051 *    <jc>// H1 with ID</jc>
052 *    H1 <jv>withId</jv> = <jsm>h1</jsm>(<js>"Product Documentation"</js>)
053 *       .id(<js>"main-title"</js>);
054 *
055 *    <jc>// H1 with styling</jc>
056 *    H1 <jv>styled2</jv> = <jsm>h1</jsm>(<js>"User Guide"</js>)
057 *       .style(<js>"color: #333; text-align: center; margin-bottom: 30px;"</js>);
058 *
059 *    <jc>// H1 with multiple elements</jc>
060 *    H1 <jv>multiple</jv> = <jsm>h1</jsm>(
061 *       <js>"Chapter 1: "</js>,
062 *       <jsm>span</jsm>().class_(<js>"chapter-title"</js>).children(<js>"Getting Started"</js>),
063 *       <js>" "</js>,
064 *       <jsm>small</jsm>(<js>"(Beginner Level)"</js>)
065 *    );
066 *
067 *    <jc>// H1 with links</jc>
068 *    H1 <jv>withLinks</jv> = <jsm>h1</jsm>(
069 *       <js>"Product: "</js>,
070 *       <jsm>a</jsm>(<js>"/products/widget"</js>, <js>"Amazing Widget"</js>),
071 *       <js>" v2.0"</js>
072 *    );
073 * </p>
074 *
075 * <p>
076 * The following convenience methods are provided for constructing instances of this bean:
077 * <ul class='javatree'>
078 *    <li class='jc'>{@link HtmlBuilder}
079 *    <ul class='javatree'>
080 *       <li class='jm'>{@link HtmlBuilder#h1() h1()}
081 *       <li class='jm'>{@link HtmlBuilder#h1(Object...) h1(Object...)}
082 *    </ul>
083 * </ul>
084 * </p>
085 *
086 * <h5 class='section'>See Also:</h5><ul>
087 *    <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
088 * </ul>
089 */
090@Marshalled(typeName = "h1")
091public class H1 extends HtmlElementMixed<H1> {
092
093   /**
094    * Creates an empty {@link H1} element.
095    */
096   public H1() {}
097
098   /**
099    * Creates an {@link H1} element with the specified child nodes.
100    *
101    * @param children The child nodes.
102    */
103   public H1(Object...children) {
104      children(children);
105   }
106
107}