Answers.Body: <p>Your code returns an <a href="http://buildwithcraft.com/docs/templating/tagmodel" rel="nofollow">TagModel</a> and saves it as "tag". You can now get all model properties like this:</p>
  
  <pre><code>{{ tag.property_name }}
  </code></pre>
  
  <p>In your case it would look like this:</p>
  
  <pre><code>{% if tag.name == 'Flower' %}
      Do stuff
  {% endif %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-13T19:14:35.893Z
Answers.LastActivityDate: 2014-06-13T19:14:35.893Z
Answers.UserDisplayName: Victor
Body: <p>Per documentation I am getting a selected tag:</p>
  
  <pre><code>{% set tag = entry.myTagsField.first() %}
  </code></pre>
  
  <p>How to check if its name is equal to "Flower"?</p>
  
Tags: <tags>
Title: How to check name of a tag
ThreadText: # How to check name of a tag
  
  (Asked by: username_0 on 2014-06-13)
  
  Per documentation I am getting a selected tag:
  
  ```
  {% set tag = entry.myTagsField.first() %}
  
  ```
  
  How to check if its name is equal to "Flower"?
  
  **Tags:** tags
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-06-13. Score: 4 | Accepted answer
  
  Your code returns an [TagModel](http://buildwithcraft.com/docs/templating/tagmodel) and saves it as "tag". You can now get all model properties like this:
  
  ```
  {{ tag.property_name }}
  
  ```
  
  In your case it would look like this:
  
  ```
  {% if tag.name == 'Flower' %}
      Do stuff
  {% endif %}
  
  ```
  
  
  ---
  
  