• HTML attributes provide additional information or modify the behaviour of HTML elements.
• Attributes are specified within the opening tag of an HTML element using the format attribute="value".
• Attributes are used to define properties such as size, color, alignment, or linking behaviour.
• Examples of common attributes include src (specifying the source of an image or media), href (defining the target URL for a hyperlink), and class (assigning a CSS class to an element for styling).
• Attributes can be used to set the width, height, or alignment of elements, control form input behaviour, or provide accessibility information.
• HTML attributes can be assigned to different elements based on their purpose and supported behaviour.
• Multiple attributes can be applied to a single element, separated by spaces within the opening tag.
• Some attributes, like id and class, can be used to uniquely identify or group elements for styling or JavaScript manipulation.
• Custom attributes can be defined for specific purposes, but it's recommended to use standardized attributes whenever possible.
• The proper use of attributes helps in creating structured, accessible, and interactive webpages.
<!DOCTYPE html>
<html>
<head>
<title>JTC</title>
</head>
<body>
<h1 style="color:blue">Welcome To JTC</h1>
<div>
<p style="color:red">This is First Div</p>
<p style="text-align:center">This is First Div</p>
</div>
</body>
</html>