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-em-element"><em></a> 023 * element. 024 * 025 * <p> 026 * The em element represents stress emphasis of its contents. It is used to mark up text that should 027 * be emphasized or stressed, typically rendered in italics by browsers. The em element indicates 028 * that the text has semantic importance and should be read with emphasis, making it different from 029 * purely stylistic italic text. It is commonly used to emphasize words or phrases within sentences 030 * to change the meaning or add emphasis to the content. 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 emphasis</jc> 037 * Em <jv>simple</jv> = <jsm>em</jsm>(<js>"important"</js>); 038 * 039 * <jc>// Emphasis with styling</jc> 040 * Em <jv>styled</jv> = <jsm>em</jsm>(<js>"critical"</js>) 041 * .class_(<js>"highlight"</js>); 042 * 043 * <jc>// Emphasis in a sentence</jc> 044 * P <jv>sentence</jv> = <jsm>p</jsm>( 045 * <js>"This is "</js>, 046 * <jsm>em</jsm>(<js>"very important"</js>), 047 * <js>" information."</js> 048 * ); 049 * 050 * <jc>// Emphasis with complex content</jc> 051 * Em <jv>complex</jv> = <jsm>em</jsm>( 052 * <js>"must"</js>, 053 * <jsm>span</jsm>().class_(<js>"not"</js>).children(<js>" not"</js>), 054 * <js>" be ignored"</js> 055 * ); 056 * 057 * <jc>// Emphasis with links</jc> 058 * Em <jv>withLinks</jv> = <jsm>em</jsm>( 059 * <js>"Please read the "</js>, 060 * <jsm>a</jsm>(<js>"/manual"</js>, <js>"manual"</js>), 061 * <js>" carefully."</js> 062 * ); 063 * 064 * <jc>// Emphasis with ID</jc> 065 * Em <jv>withId</jv> = <jsm>em</jsm>(<js>"Warning: This action cannot be undone."</js>) 066 * .id(<js>"warning-text"</js>); 067 * 068 * <jc>// Emphasis with styling</jc> 069 * Em <jv>styled2</jv> = <jsm>em</jsm>(<js>"Error: Invalid input"</js>) 070 * .style(<js>"color: red; font-weight: bold;"</js>); 071 * </p> 072 * 073 * <p> 074 * The following convenience methods are provided for constructing instances of this bean: 075 * <ul class='javatree'> 076 * <li class='jc'>{@link HtmlBuilder} 077 * <ul class='javatree'> 078 * <li class='jm'>{@link HtmlBuilder#em() em()} 079 * <li class='jm'>{@link HtmlBuilder#em(Object...) em(Object...)} 080 * </ul> 081 * </ul> 082 * </p> 083 * 084 * <h5 class='section'>See Also:</h5><ul> 085 * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a> 086 * </ul> 087 */ 088@Marshalled(typeName = "em") 089public class Em extends HtmlElementMixed<Em> { 090 091 /** 092 * Creates an empty {@link Em} element. 093 */ 094 public Em() {} 095 096 /** 097 * Creates an {@link Em} element with the specified {@link Em#children(Object[])} nodes. 098 * 099 * @param children The {@link Em#children(Object[])} nodes. 100 */ 101 public Em(Object...children) { 102 children(children); 103 } 104 105}