Skip to main content

Command Palette

Search for a command to run...

HTML Attributes: A Beginner's Guide

Published
1 min readView as Markdown
HTML Attributes: A Beginner's Guide

Attributes are the additional information that enables the user to properly redesign the skeletal structure of the web page. Elements that we have in HTML always have an attribute that generally shows the behaviors of the element. It is always present in the starting tag of the element. The attributes come up in a pair format of key and value. Now the attributes are advised to be written in lowercase letters, as it is the way recommended by w3c. We can also add multiple attributes in a single element, but for multiple attributes to work, we need to provide a proper space between them.

For example :- <p align=“right”> this is html</p>. Here align is the attribute that is used with a value right. Now the function of the align attribute is used to make the content “this is HTML” appear on the right-hand side of the web page.

More from this blog

TheCodingcoder

60 posts

Empowering the coding community by simplifying complex tasks.