HTML Attributes

HTML Attributes

HTML Attributes

HTML attributes are used to provide additional information or modify the behavior of HTML elements. They are specified within the opening tag of an HTML element and are typically written as key-value pairs. Here are some commonly used HTML attributes:

id: Specifies a unique identifier for an element within the document.
Example: <div id=”myDiv”>…</div>

class: Specifies one or more CSS class names to apply to an element.
Example: <p class=”highlight”>…</p>

style: Specifies inline CSS styles to be applied to an element.
Example: <h1 style=”color: blue;”>…</h1>

src: Specifies the source URL of an external resource, such as an image or a script.
Example: <img src=”image.jpg” alt=”Image”>

href: Specifies the URL of a linked resource, such as a webpage or a file.
Example: <a href=”https://www.example.com”>…</a>

alt: Provides alternative text for an image, to be displayed if the image cannot be loaded.
Example: <img src=”image.jpg” alt=”Image description”>

disabled: Indicates that an input element or button is disabled and cannot be interacted with.
Example: <input type=”text” disabled>

placeholder: Provides a short hint or example text within an input element.
Example: <input type=”text” placeholder=”Enter your name”>

required: Specifies that an input element must be filled out before submitting a form.
Example: <input type=”text” required>

target: Specifies the browsing context for a link navigation or form submission.
Example: <a href=”https://www.example.com” target=”_blank”>…</a>

These are just a few examples of HTML attributes. Different HTML elements have different attributes available to them. It’s important to refer to the HTML specification or relevant documentation for a comprehensive list of attributes supported by each element.

Leave a Comment

Your email address will not be published. Required fields are marked *

GLOTRU Footer
Popular Features
Popular Services/

Website Development & Design

App Development & Design

Graphic Design

Digital Marketing

SEO (Search Engine Optimization)

SMM (Social Media Marketing)

Cyber Security

Company

GLOTRU Founder & CEO : __Azam

Registared : Trade,MSME,etc

Board of Director

Team

About Us

Contact Us

Privacy Policy

Return & Refund Policy

Abuse Policy

Copyright Policy

Cookie Policy

Terms & Conditions

Universal Terms of Service

Disclaimer

Legal

Sponsorships

Investor

Press Releases

Our Investments

Brands

Newsroom

Business

...

_

Digital Millennium Copyright Act
DMCA.com Protection Status

_

Content similarity detection
Protected by Copyscape

_

***ANTI-PIRACY WARNING***

...................................................................................

Follow Us :

...................................................................................

SECURE SERVER : [Legal] [Privacy Policy] [Universal Terms of Service] [Do not sell my personal information]

SITE HOSTED : GLOTRU SECURE SERVER Asian Data Centre [You can host your site][Click Here]

SSL : Server Type : [Cloudflare] Certificate Issued By : [Let's Encrypt] Signature Algorithm : [ECDSA with SHA-384]

SITE BUILD SOFTWARE : Content Management System (CMS) Softwere

_

_

_