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-mark-element"><mark></a> 023 * element. 024 * 025 * <p> 026 * The mark element represents a run of text in one document marked or highlighted for reference 027 * purposes, due to its relevance in another context. It is used to mark up text that should be 028 * highlighted or emphasized, such as search results, important passages, or text that needs 029 * attention. The mark element is typically rendered with a yellow background or other highlighting 030 * to make the marked text stand out from the surrounding 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 marked text</jc> 037 * Mark <jv>simple</jv> = <jsm>mark</jsm>(<js>"This text is highlighted"</js>); 038 * 039 * <jc>// Mark with styling</jc> 040 * Mark <jv>styled</jv> = <jsm>mark</jsm>(<js>"Styled highlighted text"</js>) 041 * .class_(<js>"highlight"</js>); 042 * 043 * <jc>// Mark with complex content</jc> 044 * Mark <jv>complex</jv> = <jsm>mark</jsm>( 045 * <js>"The "</js>, 046 * <jsm>strong</jsm>(<js>"important"</js>), 047 * <js>" information is highlighted."</js> 048 * ); 049 * 050 * <jc>// Mark with ID</jc> 051 * Mark <jv>withId</jv> = <jsm>mark</jsm>(<js>"Text with ID"</js>) 052 * .id(<js>"highlighted-text"</js>); 053 * 054 * <jc>// Mark with styling</jc> 055 * Mark <jv>styled2</jv> = <jsm>mark</jsm>(<js>"Custom styled highlighted text"</js>) 056 * .style(<js>"background-color: #ffeb3b; color: #000; padding: 2px 4px;"</js>); 057 * 058 * <jc>// Mark with multiple elements</jc> 059 * Mark <jv>multiple</jv> = <jsm>mark</jsm>( 060 * <js>"The "</js>, 061 * <jsm>mark</jsm>(<js>"key points"</js>), 062 * <js>" are "</js>, 063 * <jsm>mark</jsm>(<js>"highlighted"</js>), 064 * <js>" for emphasis."</js> 065 * ); 066 * 067 * <jc>// Mark with links</jc> 068 * Mark <jv>withLinks</jv> = <jsm>mark</jsm>( 069 * <js>"See "</js>, 070 * <jsm>a</jsm>(<js>"/search"</js>, <js>"search results"</js>), 071 * <js>" for more information."</js> 072 * ); 073 * </p> 074 * 075 * <h5 class='section'>See Also:</h5><ul> 076 * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a> 077 * </ul> 078 */ 079@Marshalled(typeName = "mark") 080public class Mark extends HtmlElementMixed<Mark> { 081 082 /** 083 * Creates an empty {@link Mark} element. 084 */ 085 public Mark() {} 086 087 /** 088 * Creates a {@link Mark} element with the specified child nodes. 089 * 090 * @param children The child nodes. Must not be <jk>null</jk>. 091 */ 092 public Mark(Object...children) { 093 children(children); 094 } 095 096}