Here you can find the source of div(String text)
Parameter | Description |
---|---|
text | the contents of the element. |
public static String div(String text)
//package com.java2s; /*--------------------------------------------------------------- * Copyright 2005 by the Radiological Society of North America * * This source software is released under the terms of the * RSNA Public License (http://mirc.rsna.org/rsnapubliclicense) *----------------------------------------------------------------*/ public class Main { /**/* w w w . j av a 2 s . c om*/ * Creates a div element. * @param text the contents of the element. * @return the element string. */ public static String div(String text) { return "<div>" + text + "</div>"; } /** * Creates a div element with attributes. * @param attributes the attributes of the element. * @param text the contents of the element. * @return the element string. */ public static String div(String attributes, String text) { return "<div" + (!attributes.equals("") ? " " + attributes : "") + ">" + text + "</div>"; } }