Get Entries That Match ALL of the tags specified I have a search page where a user can check about 20 different checkboxes, where these checkboxes all relate to tags I have set up inside of Craft. I would like to perform the following search query:

For all of the tags selected, I would like to return a list of entries that have ALL of these tags. For example:

The user clicks the checkboxes, "SCC" and "HVT"

A query should be performed that returns only the entries that have the tags, "SCC" AND "HVT". I have been reading Craft docs for the past 3 hours, and am not grasping this concept at all.

I know this is hardcoded, but I was just experimenting, and it does not work at all:

{% set entries = craft.entries.section('journalArticles').relatedTo('and', { targetElement: 'SCC' }, { targetElement: 'HPV' }) %}


I do not want to use a plugin if I don't have to.
Short version
change the title into an id and it will work
{% set entries = craft.entries.section('journalArticles').relatedTo(
    'and', 
    { targetElement: &gt;&gt;idOfYourElement&lt;&lt; }, 
    { targetElement: &gt;&gt;idOfYourElement&lt;&lt; }) 
%}

Long version
It looks a little bit nasty (I never do these kind of things in twig because I don't like the syntax and prefer PHP for many reasons) but here you can see a working example for a twig search form
first your html: it could be like this
&lt;form&gt;
    {# loop all your tags and display a checkbox for each one #}
    {# Important: insert the id of your tag as value not the title #}
    {% for tag in craft.tags.group('default') %}
        &lt;input type=&quot;checkbox&quot; name=&quot;selectedTags[]&quot; value=&quot;{{ tag.id }}&quot;&gt;{{ tag.title }}&lt;br&gt;
    {% endfor %}
    &lt;br&gt;
    &lt;input type=&quot;submit&quot; value=&quot;submit&quot; name=&quot;submit&quot;&gt;
&lt;/form&gt;

And your twig
{% set isSubmitted = craft.request.getParam('submit') %}
{% if isSubmitted %}
    {# get all selected input ids #}
    {% set allRelatedTags = craft.request.getParam('selectedTags') %}
    
    {# proceed only if the user selected at least one tag #}
    {% if allRelatedTags %}
        {# build your related to array #}
        {% set relations = ['and'] %}
    
        {# inlcude an additional 'targetElement' for each selected tag #}
        {% for tag in allRelatedTags %}
            {% set relations =  relations|merge([{targetElement: tag}])%}
        {% endfor %}
        
        {# search for entries with the related parameters #}
        {% for entry in craft.entries.relatedTo(relations).find() %}
            {{ entry.title }}&lt;br&gt;
        {% endfor %}
    {% endif %}
{% endif %}

The reason why your code did not work is quite simple as you can see in the relatedTo documentation

In its simplest form, you can pass in one of these things to it:
An AssetFileModel, CategoryModel, EntryModel, UserModel, or TagModel object
An element’s ID
An array of element objects and/or IDs

you inserted the not unique title which could be everything. So all you have to do is to insert the id of your element instead of the title... that's it