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-br-element"><br></a> 023 * element. 024 * 025 * <p> 026 * The br element represents a line break. It is used to create a line break in text content, 027 * forcing the text that follows it to start on a new line. The br element is a void element 028 * that does not contain any content and is typically used within text content to create 029 * line breaks where needed, such as in addresses, poetry, or other formatted text. 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 line break</jc> 036 * Br <jv>simple</jv> = <jsm>br</jsm>(); 037 * 038 * <jc>// Address with line breaks</jc> 039 * P <jv>address</jv> = <jsm>p</jsm>( 040 * <js>"John Doe"</js>, 041 * <jsm>br</jsm>(), 042 * <js>"123 Main Street"</js>, 043 * <jsm>br</jsm>(), 044 * <js>"Anytown, ST 12345"</js> 045 * ); 046 * 047 * <jc>// Poetry with line breaks</jc> 048 * P <jv>poetry</jv> = <jsm>p</jsm>( 049 * <js>"Roses are red,"</js>, 050 * <jsm>br</jsm>(), 051 * <js>"Violets are blue,"</js>, 052 * <jsm>br</jsm>(), 053 * <js>"Sugar is sweet,"</js>, 054 * <jsm>br</jsm>(), 055 * <js>"And so are you."</js> 056 * ); 057 * 058 * <jc>// Contact information</jc> 059 * P <jv>contact</jv> = <jsm>p</jsm>( 060 * <js>"Phone: (555) 123-4567"</js>, 061 * <jsm>br</jsm>(), 062 * <js>"Email: john@example.com"</js>, 063 * <jsm>br</jsm>(), 064 * <js>"Website: www.example.com"</js> 065 * ); 066 * 067 * <jc>// Styled line break</jc> 068 * Br <jv>styled</jv> = <jsm>br</jsm>() 069 * .class_(<js>"line-break"</js>) 070 * .style(<js>"margin: 10px 0;"</js>); 071 * 072 * <jc>// Multiple line breaks</jc> 073 * P <jv>multiple</jv> = <jsm>p</jsm>( 074 * <js>"First line"</js>, 075 * <jsm>br</jsm>(), 076 * <jsm>br</jsm>(), 077 * <js>"Third line (with extra space)"</js> 078 * ); 079 * 080 * <jc>// Line break in a list</jc> 081 * Li <jv>listItem</jv> = <jsm>li</jsm>( 082 * <js>"Item 1"</js>, 083 * <jsm>br</jsm>(), 084 * <js>"Additional details for item 1"</js> 085 * ); 086 * </p> 087 * 088 * <p> 089 * The following convenience methods are provided for constructing instances of this bean: 090 * <ul class='javatree'> 091 * <li class='jc'>{@link HtmlBuilder} 092 * <ul class='javatree'> 093 * <li class='jm'>{@link HtmlBuilder#br() br()} 094 * </ul> 095 * </ul> 096 * </p> 097 * 098 * <h5 class='section'>See Also:</h5><ul> 099 * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a> 100 * </ul> 101 */ 102@Marshalled(typeName = "br") 103public class Br extends HtmlElementVoid<Br> { 104 105 /** 106 * Creates an empty {@link Br} element. 107 */ 108 public Br() { /* Empty constructor. */ } 109 110}