diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/AdminConstants.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/AdminConstants.java
index cc6a136..14e7abc 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/AdminConstants.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/AdminConstants.java
@@ -31,6 +31,8 @@
 
   String defaultRevisionSpec();
 
+  String annotation();
+
   String buttonDeleteIncludedGroup();
 
   String buttonAddIncludedGroup();
@@ -177,6 +179,8 @@
 
   String columnTagRevision();
 
+  String columnTagAnnotation();
+
   String initialRevision();
 
   String revision();
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/AdminConstants.properties b/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/AdminConstants.properties
index 1588ea6..ef4ae5f 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/AdminConstants.properties
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/AdminConstants.properties
@@ -3,6 +3,7 @@
 defaultBranchName = Branch Name
 defaultTagName = Tag Name
 defaultRevisionSpec = Revision (Branch or SHA-1)
+annotation = Annotation (optional)
 
 buttonDeleteIncludedGroup = Delete
 buttonAddIncludedGroup = Add
@@ -84,6 +85,7 @@
 columnBranchRevision = Revision
 columnTagName = Tag Name
 columnTagRevision = Revision
+columnTagAnnotation = Annotation
 initialRevision = Initial Revision
 revision = Revision
 buttonAddBranch = Create Branch
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/ProjectTagsScreen.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/ProjectTagsScreen.java
index 45d0fdb..6829555 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/ProjectTagsScreen.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/ProjectTagsScreen.java
@@ -71,6 +71,7 @@
   private Button addTag;
   private HintTextBox nameTxtBox;
   private HintTextBox irevTxtBox;
+  private HintTextBox annotationTxtBox;
   private FlowPanel addPanel;
   private NpTextBox filterTxt;
   private Query query;
@@ -105,6 +106,7 @@
     addTag.setEnabled(true);
     nameTxtBox.setEnabled(true);
     irevTxtBox.setEnabled(true);
+    annotationTxtBox.setEnabled(true);
   }
 
   @Override
@@ -120,14 +122,11 @@
 
     addPanel = new FlowPanel();
 
-    Grid addGrid = new Grid(2, 2);
+    Grid addGrid = new Grid(3, 2);
     addGrid.setStyleName(Gerrit.RESOURCES.css().addBranch());
     int texBoxLength = 50;
 
-    nameTxtBox = new HintTextBox();
-    nameTxtBox.setVisibleLength(texBoxLength);
-    nameTxtBox.setHintText(AdminConstants.I.defaultTagName());
-    nameTxtBox.addKeyPressHandler(
+    KeyPressHandler onKeyPress =
         new KeyPressHandler() {
           @Override
           public void onKeyPress(KeyPressEvent event) {
@@ -135,25 +134,29 @@
               doAddNewTag();
             }
           }
-        });
+        };
+
+    nameTxtBox = new HintTextBox();
+    nameTxtBox.setVisibleLength(texBoxLength);
+    nameTxtBox.setHintText(AdminConstants.I.defaultTagName());
+    nameTxtBox.addKeyPressHandler(onKeyPress);
     addGrid.setText(0, 0, AdminConstants.I.columnTagName() + ":");
     addGrid.setWidget(0, 1, nameTxtBox);
 
     irevTxtBox = new HintTextBox();
     irevTxtBox.setVisibleLength(texBoxLength);
     irevTxtBox.setHintText(AdminConstants.I.defaultRevisionSpec());
-    irevTxtBox.addKeyPressHandler(
-        new KeyPressHandler() {
-          @Override
-          public void onKeyPress(KeyPressEvent event) {
-            if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) {
-              doAddNewTag();
-            }
-          }
-        });
+    irevTxtBox.addKeyPressHandler(onKeyPress);
     addGrid.setText(1, 0, AdminConstants.I.revision() + ":");
     addGrid.setWidget(1, 1, irevTxtBox);
 
+    annotationTxtBox = new HintTextBox();
+    annotationTxtBox.setVisibleLength(texBoxLength);
+    annotationTxtBox.setHintText(AdminConstants.I.annotation());
+    annotationTxtBox.addKeyPressHandler(onKeyPress);
+    addGrid.setText(2, 0, AdminConstants.I.columnTagAnnotation() + ":");
+    addGrid.setWidget(2, 1, annotationTxtBox);
+
     addTag = new Button(AdminConstants.I.buttonAddTag());
     addTag.addClickHandler(
         new ClickHandler() {
@@ -237,17 +240,24 @@
       return;
     }
 
+    String annotation = annotationTxtBox.getText().trim();
+    if (annotation.isEmpty()) {
+      annotation = null;
+    }
+
     addTag.setEnabled(false);
     ProjectApi.createTag(
         getProjectKey(),
         tagName,
         rev,
+        annotation,
         new GerritCallback<TagInfo>() {
           @Override
           public void onSuccess(TagInfo tag) {
             showAddedTag(tag);
             nameTxtBox.setText("");
             irevTxtBox.setText("");
+            annotationTxtBox.setText("");
             query = new Query(match).start(start).run();
           }
 
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/projects/ProjectApi.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/projects/ProjectApi.java
index 2efab8e..ff4c810 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/projects/ProjectApi.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/projects/ProjectApi.java
@@ -62,9 +62,14 @@
 
   /** Create a new tag */
   public static void createTag(
-      Project.NameKey name, String ref, String revision, AsyncCallback<TagInfo> cb) {
+      Project.NameKey name,
+      String ref,
+      String revision,
+      String annotation,
+      AsyncCallback<TagInfo> cb) {
     TagInput input = TagInput.create();
     input.setRevision(revision);
+    input.setMessage(annotation);
     project(name).view("tags").id(ref).ifNoneMatch().put(input, cb);
   }
 
@@ -355,6 +360,8 @@
     protected TagInput() {}
 
     final native void setRevision(String r) /*-{ if(r)this.revision=r; }-*/;
+
+    final native void setMessage(String m) /*-{ if(m)this.message=m; }-*/;
   }
 
   private static class BranchInput extends JavaScriptObject {
