public void title(String title) {
        Validate.notNull(title);
        Element titleEl = getElementsByTag("title").first();
        if (titleEl == null) { // add to head
            head().appendElement("title").text(title);
        } else {
            titleEl.text(title);
        }
    }
public void title ( String title ) { Validate . notNull ( title ) ; Element titleEl = getElementsByTag ( "title" ) . first ( ) ; if ( titleEl == null ) { head ( ) . appendElement ( "title" ) . text ( title ) ; } else { titleEl . text ( title ) ; } }
Set the document's {@code title} element. Updates the existing element, or adds {@code title} to {@code head} if
not present
@param title string to set as title