Tags | Tags |
Overview
The ability to add tags to content is one of Stack Overflow for Teams' most effective organizational features. Tags categorize and organize content, making it easier for users to locate information. Tags also help subject matter experts and other knowledgeable users locate questions they can answer.
While regular users can add and remove tags, site administrators and moderators have additional controls. These include adding tags apart from content, merging and renaming tags, creating tag synonyms, and deleting tags.
NOTE: This article is for site administrators and moderators. If you're a regular user, read the Tags article instead.
NOTE: Several of the tag administration features listed below are available in Stack Overflow for Teams Business and Enterprise only.
Add a Tag
Regular users and moderators can add new tags only as part of the content creation or editing process. Site administrators on the Teams Business and Enterprise plans can add stand-alone tags at any time, creating tags not initially connected with a question or article. This allows admins to preload tags, with additional tag info, for users to discover and use. This is especially useful when setting up new sites or teams. Tags created in this way are exempt from the automated cleanup process that deletes unused tags.
To create new tags one at a time, admins can go to the Tags page and click Add new tag. The pop-up window that appears has fields for tag name, description and usage guidance.
NOTE: The Add new tag button is available only on the Teams Business and Enterprise plans. Teams Free and Basic add tags when first assigned to new or existing content.
Add bulk tags (Teams Business and Enterprise)
The Upload CSV button in the upper-right corner of the Tags page allows Teams Business and Enterprise admins to add new tags in bulk. The tag upload tool is an efficient way to create multiple tags at the same time, which is helpful for encouraging quick user engagement in a new site or team.
Click Upload CSV to display a pop-up window with information about the required format of the uploaded CSV file.
Prepare your tag data file to match the format detailed in the Upload tags window. Click to browse for the CSV file, or drag it into the upload box. Click Upload.
NOTE: If the CSV file contains tags that already exist, Stack Overflow for Teams will skip those tags. It will not update or modify the existing tag info.
Merge or rename a tag
Users often create multiple similar tags that would be better combined into one. Your site could have questions tagged coffee, espresso, and mocha, when a single caffeine tag might be more effective. Merging tags eliminates this redundancy; creating tag synonyms keeps it from recurring in the future.
Merging tags lets you specify a single tag that Stack Overflow for Teams will use to overwrite all specified similar tags. In the example above, a merge would replace the coffee, espresso, and mocha tags with the caffeine tag across all questions and Articles bearing those tags.
This is only half the solution, however. After the tag merge, a user could reintroduce the problem by adding a new question with the mocha tag. Tag synonyms address this by letting you create synonyms that point to a single desired tag. If a caffeine tag has coffee, espresso, and mocha synonyms, for example, Stack Overflow for Teams would insert the caffeine tag any time a user enters one of the synonyms.
You can also create synonyms with alternate spellings or pluralization for a tag (for example: colour as a synonym for color, queries as a synonym for query). This helps eliminate redundancy in tags, making content easier to locate.
When searching with the [tag]
operator, Stack Overflow for Teams also searches for synonyms to locate the main tag. A search with the [espresso]
tag operator, in our previous example, would return posts tagged with caffeine.
To merge tags, go to the tag page by clicking on the tag name in any list. Click Merge. On Teams Business and Enterprise, you can also click the three dots button in any tag row on the Tags page and select Merge. The Merge tags page will appear.
Stack Overflow for Teams will automatically fill in the Source tag box. In the Target tag box, enter the tag the current tag should be merged into (for example: Source tag mocha becomes Target tag caffeine). To "future-proof" the merge, create a synonym (for example: defining mocha as a synonym for caffeine). Do this by checking Create a synonym between these two tags after merging.
NOTE: You can create a new tag during the merge process by entering it as the Target tag.
Create a synonym
In addition to creating a synonym as part of the merge process, you can add a synonym to a tag at any time. Click the tag name to access the tag page, then click Synonyms. The tag synonyms page opens, showing existing synonyms (if any) for the tag.
To suggest a new synonym, type it into the Suggest a [tag] synonym box and click Suggest. The new synonym will appear in the list with upvote and downvote buttons.
To approve your new synonym suggestion, click see all tag synonyms. The Tag synonyms page appears, showing all existing tag synonyms.
Click Approve or Merge for any synonym you wish to approve. Each synonym row also has a three dots button. Click this to Swap the synonym and target tags or Delete the synonym.
Regular users with adequate activity in the tag and enough reputation can also suggest synonyms, which the community approves with a voting process.
Delete a tag
Teams Business and Enterprise admins can delete a tag directly from the Tags page. Click the three dots button in any tag row, then select Delete. A confirmation box will appear; click Delete tag to permanently delete the tag.
On all Stack Overflow for Teams plans, you can indirectly delete a tag by removing it from all questions or articles. The site will automatically delete any tags not associated with content during automated maintenance.
Any user can immediately recreate a deleted tag by entering it as a tag for new or edited content. To ensure that a tag remains unusable, add it as a synonym for a different, valid tag. Stack Overflow for Teams will then replace the (deleted) synonym tag with the desired tag.
Syntax highlighting
For tags that pertain to programming, you can define which language to use for syntax highlighting and formatting in code blocks. Stack Overflow for Teams will recognize the tag and highlight any code in that tagged content.
For more information on setting code syntax highlighting at the tag level, read Syntax Highlighting in Code Blocks.
Need help? Submit an issue or question through our support portal.