syntax summary

The whole point of a markdown language is to add clarification to the content that you produce. Because, the more descriptive your HTML document is, the more functional it can be.

Attributes serve the purpose of adding extra layers of definition and information for your tags.

how we do...

Okay, so you know what tags and elements are, such as this...

<p>Hello, World!</p>

Now this element is all fine and dandy. But what if I want to make this one element special or I need to add a special feature to this element? That's where attributes come in.

Attributes are placed inside the opening tag of an element, right after the element character. Like this...

<p style="color: red;">Hello, World!</p>

So, there are two parts to an attribute; the attribute name (style) and the attribute value ("color: red;"). The attribute is put into a formulaic process of the attribute name, then an equal sign, then the attribute value that's enclosed in double-quotation marks. Let me give you another example...

<p style="background-color: red; color: white;">Hello, World!</p>

And cause I know you're curious what that line of code does...

Hello, World!

As you can see, attributes add extra description and functionality to your element.

Inline Styling

Inline Styling