HTML – WatchOut! Attributes?

In the previous lesson of HTML, we covered the basics of HTML tags. Its time we introduce you to some power of these tags. Attributes contain information of the HTML tag that you don’t want on the main webpage to appear. For example – Applying different styles or animations. Every tag has some common attributes and some unique attributes. Let’s look at the general way to write an attribute:

<tag attribute=""></tag>

Attributes are written inside the first tag arrows with the attribute name succeeded by an equal operator and then quotes. The quotes contain the value of the attributes. The quotes can either be single or double but not both together more on that later. Without quotes, the HTML won’t work as you wish it to work. If you missed quotes in a development environment than the node will give a syntax error. Attributes can also be of boolean type. Boolean Attributes are attributes without values. Let’s see an example:

<tag attribute></tag>

This is the end of theoretical lessons on HTML. With the next lesson, we will begin with project-based learning. As that will help you understand HTML even better. Another reason for that is I am not a theory lover. With the next lesson, we will introduce you to a few important attributes of HTML tags and some important HTML tags as we build more powerful HTML pages. Till than Subscribe to the newsletter for notification and Stay Safe! Stay Humble!.

manorinfinity Written by:

Complex Problem Solver, Outloud Thinker, An Outstanding Writer, and a very curious human being

Be First to Comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.