Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form
In Webflow, HTML tags give us an easy way to control the default styling for a particular element, without creating a unique class. For example, you can define the default styles for all paragraphs by editing the All Paragraphs tag. Adding a class with styles will override these default styles.
Here’s what we’ll be covering:
Want to follow along with this lesson? Fortunately, we created a zip file which contains all the assets used in the project, and we've included that linkright here
Tags give us a great way to control the default styling for a particular element type. As we already know, we can set a lot of defaults for our project — like font settings — inside our Body (All Pages) Tag. This is a great starting point.
So we're going cover three examples for styling Tags: Headings, Links, and Images.
Let's do Headings. If we drag in a Heading from our Elements panel? Make it an H1? Of course, we're getting some style values here, like font, from our Body (All Pages) Tag.
But let's use our dropdown, and select All H1 Headings. And just like that, we have access to styling the Tag. All H1 Headings throughout our project. Let's make some changes to the margin to affect spacing, and we can go in and affect font size. Maybe we want all our H1s to have a thicker font weight so we can adjust the font weight.
And now whenever we drag an H1 into our project, we're starting with these defaults.
This doesn't stop us from using classes. In fact, we can create a class on any of our H1s — maybe this one is a major Heading — so we'll make some changes to affect that. These changes are using the All H1 Headings Tag as a starting point. Of course, not every H1 in our project needs to look identical. Or we can remove that class, and check our orange indicator to see that, once again, things are being inherited from our All H1 Headings Tag.
So, headings here can take a lot of styling cues from the Body. When we modify our All H1 Headings Tag, we're affecting the default styling for H1s. We can style further by adding a class, and we can even do variants of those using combo classes.
The combo class takes its styling cues from its base class, which takes its styling cues from the Tag, which takes its styling cues from the body, which takes its styling cues from GQ.
Let's power through Links. Here's a paragraph. Let's go in (double-click) then select some text. And we'll make it a Link. Let's do the same thing for some more text, again, making this a Link. And with any of these selected, let's go up in our Style panel and hit the dropdown to select All Links.
From here, we can mess with text decoration. Or we can change our default Link color. Keep in mind that All Links also serves as the basis for other types of Links. So in Hover here, we can change the font color. But if we go over again to the Elements panel, then we drag in a button, on hover, we can see that our All Links style affects this, too. So that's something to keep in mind when styling.
That's the All Links Tag.
Let's end on Images.
From our Asset Manager, we'll drag an Image right onto the page. And with any Image selected (like this one), let's go to our All Images Tag. Actually, this is a great time to go back and show that we can do this even after we've added a class or combo class. Let's create a quick class and hit enter. And now, we can click in over here, and select our Tag right from the dropdown: the All Images Tag.
Say, by default, we want Image elements we add to our project to have rounded corners. We can set our rounding, and not only can we see it on the Canvas, but if we go into the Asset Manager and pick a new Image to drag in? It's carrying those defaults from the Tag (the All Images Tag).
So. Tags. Do you need them? Hanes might argue "no." Others, like Dale, will argue "yes."
The truth is, the real answer is somewhere in between: it's entirely up to you. If you're creating a quick one-page project with a Heading and a paragraph, do you need to go in and configure all your Tags? Probably not. But as you scale, Tags can save you a ton of time by giving certain element types a starting point. A basis for styles on particular kinds of elements.
But that's it. Those are some of our thoughts on Tags.
Thanks for the feedback! This will help us improve our content.
Something went wrong while submitting the form. Please contact email@example.com