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-b-element"><b></a> 023 * element. 024 * 025 * <p> 026 * The b element represents a span of text to which attention is being drawn for utilitarian purposes 027 * without conveying any extra importance and with no implication of an alternate voice or mood. It is 028 * used to stylistically offset text from the normal prose without conveying any special importance or 029 * emphasis. The b element is typically rendered in bold by browsers, but the visual styling should be 030 * controlled with CSS rather than relying on the default browser styling. 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>// Product name in a sentence</jc> 037 * B <jv>product</jv> = <jsm>b</jsm>(<js>"Widget Pro"</js>); 038 * 039 * <jc>// Keywords in text</jc> 040 * B <jv>keywords</jv> = <jsm>b</jsm>(<js>"HTML"</js>, <jsm>b</jsm>(<js>"CSS"</js>), <js>" and "</js>, <jsm>b</jsm>(<js>"JavaScript"</js>)); 041 * 042 * <jc>// Names or titles</jc> 043 * B <jv>name</jv> = <jsm>b</jsm>(<js>"Dr. Jane Smith"</js>); 044 * 045 * <jc>// Stylistic offset without emphasis</jc> 046 * B <jv>offset</jv> = <jsm>b</jsm>(<js>"Important note"</js>).class_(<js>"highlight"</js>); 047 * 048 * <jc>// Text that needs visual distinction</jc> 049 * B <jv>distinct</jv> = <jsm>b</jsm>(<js>"User ID: 12345"</js>); 050 * 051 * <jc>// Mixed content with bold text</jc> 052 * B <jv>mixed</jv> = <jsm>b</jsm>( 053 * <js>"Welcome to "</js>, 054 * <jsm>b</jsm>(<js>"Our Website"</js>), 055 * <js>" - the best place for "</js>, 056 * <jsm>b</jsm>(<js>"quality products"</js>) 057 * ); 058 * 059 * <jc>// Bold text with styling</jc> 060 * B <jv>styled</jv> = <jsm>b</jsm>(<js>"Amazing Widget"</js>) 061 * .class_(<js>"product-name"</js>) 062 * .style(<js>"color: blue;"</js>); 063 * </p> 064 * 065 * <p> 066 * The following convenience methods are provided for constructing instances of this bean: 067 * <ul class='javatree'> 068 * <li class='jc'>{@link HtmlBuilder} 069 * <ul class='javatree'> 070 * <li class='jm'>{@link HtmlBuilder#b() b()} 071 * <li class='jm'>{@link HtmlBuilder#b(Object...) b(Object...)} 072 * </ul> 073 * </ul> 074 * </p> 075 * 076 * <h5 class='section'>See Also:</h5><ul> 077 * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a> 078 * </ul> 079 */ 080@Marshalled(typeName = "b") 081public class B extends HtmlElementMixed<B> { 082 083 /** 084 * Creates an empty {@link B} element. 085 */ 086 public B() {} 087 088 /** 089 * Creates a {@link B} element with the specified child nodes. 090 * 091 * @param children The child nodes. 092 */ 093 public B(Object...children) { 094 children(children); 095 } 096 097}