anchor.diff:  tag([_ | _] = Tag, Attrs, Value) ->
       [$<, Tag, [[$\s | V] || V <- Attrs], $>, Value, "</", Tag, $>].
   
  -%% @doc
  +%% @doc Generate HTML code for a labelled checkbox input field.
   -spec checkbox(Session :: #session{},
                  ID :: nonempty_string(),
                  Name :: echessd_query_parser:http_query_key(),
                  CaptionTextID :: atom(),
  -               IsChecked :: boolean()) ->
  -                      HTML :: iolist().
  +               IsChecked :: boolean()) -> HTML :: iolist().
   checkbox(Session, ID, Name, CaptionTextID, IsChecked) ->
       [io_lib:format(
          "<label for=~s><input type=checkbox id=~s name=~w", [ID, ID, Name]),
        proplists:get_value(IsChecked, [{false, ""}], " checked"), ">&nbsp;",
        gettext(Session, CaptionTextID, []), "</label>"].
   
  -%% @doc
  +%% @equiv input(Session, Name, CaptionTextID, Value, [])
  +%% @doc Generate HTML code for a text input field.
   -spec input(Session :: #session{},
               Name :: echessd_query_parser:http_query_key(),
               CaptionTextID :: atom(),
  -            Value :: any()) ->
  +            Value :: any()) -> HTML :: iolist().
  +input(Session, Name, CaptionTextID, Value) ->
  +    input(Session, Name, CaptionTextID, Value, []).
  +
  +%% @doc Generate HTML code for a text input field.
  +-spec input(Session :: #session{},
  +            Name :: echessd_query_parser:http_query_key(),
  +            CaptionTextID :: atom(),
  +            Value :: any(), ExtraAttrs :: [string()]) ->
                      HTML :: iolist().
  -input(Session, Name, CaptionTextID, Value) ->
  +input(Session, Name, CaptionTextID, Value, ExtraAttrs) ->
       EncodedValue =
           echessd_lib:escape_html_entities(
             echessd_query_parser:encode(Name, Value)),
       [gettext(Session, CaptionTextID, []), ": ",
  -     io_lib:format("<input name=~w type=text value='~s'>",
  -                   [Name, EncodedValue])].
  -
  -%% @doc
  +     io_lib:format(
  +       "<input name=~w type=text value='~s' ~s>",
  +       [Name, EncodedValue, string:join(ExtraAttrs, " ")])].
  +
  +%% @doc Generate HTML code for a password input field.
   -spec password(Session :: #session{},
                  Name :: echessd_query_parser:http_query_key(),
                  CaptionTextID :: atom()) -> HTML :: iolist().
  
positive.code:     [gettext(Session, CaptionTextID, []), ": ",
       io_lib:format("<input name=~w type=password>", [Name])].
  
  %% @doc
  -spec submit(Session :: #session{}, CaptionTextID :: atom()) ->
                      HTML :: iolist().
  submit(Session, CaptionTextID) ->
  
negative.code:     io_lib:format("<input name=~w type=hidden value='~s'>",
                    [Name, EncodedValue]).
  
  %% @doc Generate HTML code for a dropdown select list.
  -spec select(Session :: #session{},
               Name :: echessd_query_parser:http_query_key(),
               CaptionTextID :: atom(),
  