private void displayFormat(StringBuilder sb, String currLabel,
			ArrayList<Task> array, ArrayList<Task> target, Task addedTask) {
		if (array != null) {
			if (!control.isHideLabel(currLabel)) {
				sb.append("<span class = label><b>" + currLabel + "("
						+ array.size() + ")" + "</b></span>: <br>");
				for (int i = 0; i < array.size(); i++) {
					Task task = array.get(i);
					if (i == 0) {
						sb.append("<div class= datagrid><table>");
						sb.append("<tr class = heading> <th class = taskId>TaskID</th> "
								+ "<th>TaskDetails</th> "
								+ "<th class = dateTime>Date/Time</th> </tr>");
					}
					if (task.isDone()) {
						sb.append(displayTaskInRow(task, " class = done",
								target, addedTask));
					} else if (task.getDateAndTime().isOverdue()) {
						sb.append(displayTaskInRow(task, " class = overdue",
								target, addedTask));
					} else if (task.isHighPriority()) {
						sb.append(displayTaskInRow(task, " class = priority",
								target, addedTask));
					} else if (i % 2 == 0) {
						sb.append(displayTaskInRow(task, " class = alt",
								target, addedTask));
					} else {
						sb.append(displayTaskInRow(task, " class =", target,
								addedTask));
					}
				}
				sb.append("</table></div>");
			}
		}
	}