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-section-element">&lt;section&gt;</a>
023 * element.
024 *
025 * <p>
026 * The section element represents a generic section of a document or application. It is used
027 * to group related content together and create a logical structure within a document. The
028 * section element should have a heading (h1-h6) to identify the section's topic and is
029 * typically used to divide content into thematic groups. It is important for creating
030 * accessible document structure and helps screen readers understand the organization of content.
031 *
032 * <h5 class='section'>Examples:</h5>
033 * <p class='bcode w800'>
034 *    <jc>// Simple section</jc>
035 *    Section <jv>simple</jv> = <jsm>section</jsm>(
036 *       <jsm>h2</jsm>(<js>"Introduction"</js>),
037 *       <jsm>p</jsm>(<js>"This is the introduction section."</js>)
038 *    );
039 *
040 *    <jc>// Section with styling</jc>
041 *    Section <jv>styled</jv> = <jsm>section</jsm>(
042 *       <jsm>h2</jsm>(<js>"Features"</js>),
043 *       <jsm>p</jsm>(<js>"Here are the key features of our product."</js>)
044 *    ).class_(<js>"content-section"</js>);
045 *
046 *    <jc>// Section with complex content</jc>
047 *    Section <jv>complex</jv> = <jsm>section</jsm>(
048 *       <jsm>h2</jsm>(<js>"Getting Started"</js>),
049 *       <jsm>p</jsm>(<js>"Follow these steps to get started:"</js>),
050 *       <jsm>ol</jsm>(
051 *          <jsm>li</jsm>(<js>"Step 1: Install the software"</js>),
052 *          <jsm>li</jsm>(<js>"Step 2: Configure settings"</js>),
053 *          <jsm>li</jsm>(<js>"Step 3: Start using the application"</js>)
054 *       )
055 *    );
056 *
057 *    <jc>// Section with ID</jc>
058 *    Section <jv>withId</jv> = <jsm>section</jsm>(
059 *       <jsm>h2</jsm>(<js>"Main Content"</js>),
060 *       <jsm>p</jsm>(<js>"This is the main content section."</js>)
061 *    ).id(<js>"main-content"</js>);
062 *
063 *    <jc>// Section with styling</jc>
064 *    Section <jv>styled2</jv> = <jsm>section</jsm>(
065 *       <jsm>h2</jsm>(<js>"Styled Section"</js>),
066 *       <jsm>p</jsm>(<js>"This section has custom styling."</js>)
067 *    ).style(<js>"background-color: #f9f9f9; padding: 20px; margin: 10px 0;"</js>);
068 *
069 *    <jc>// Section with multiple elements</jc>
070 *    Section <jv>multiple</jv> = <jsm>section</jsm>(
071 *       <jsm>h2</jsm>(<js>"Documentation"</js>),
072 *       <jsm>p</jsm>(<js>"This section contains documentation."</js>),
073 *       <jsm>ul</jsm>(
074 *          <jsm>li</jsm>(<js>"API Reference"</js>),
075 *          <jsm>li</jsm>(<js>"User Guide"</js>),
076 *          <jsm>li</jsm>(<js>"Examples"</js>)
077 *       ),
078 *       <jsm>footer</jsm>(<js>"Last updated: January 2024"</js>)
079 *    );
080 *
081 *    <jc>// Section with article</jc>
082 *    Section <jv>withArticle</jv> = <jsm>section</jsm>(
083 *       <jsm>h2</jsm>(<js>"Latest News"</js>),
084 *       <jsm>article</jsm>(
085 *          <jsm>h3</jsm>(<js>"News Article Title"</js>),
086 *          <jsm>p</jsm>(<js>"Article content goes here."</js>)
087 *       )
088 *    );
089 * </p>
090 *
091 * <h5 class='section'>See Also:</h5><ul>
092 *    <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
093 * </ul>
094 */
095@Marshalled(typeName = "section")
096public class Section extends HtmlElementMixed<Section> {
097
098   /**
099    * Creates an empty {@link Section} element.
100    */
101   public Section() {}
102
103   /**
104    * Creates a {@link Section} element with the specified child nodes.
105    *
106    * @param children The child nodes.
107    */
108   public Section(Object...children) {
109      children(children);
110   }
111}