0% found this document useful (0 votes)
6 views1 page

HTML Attributes Cheat Sheet

This document is a cheat sheet for HTML attributes, listing various attributes along with their corresponding HTML tags and purposes. Examples are provided for each attribute to illustrate their usage. Key attributes include href for links, src for source files, and id for unique identifiers.

Uploaded by

cglprep9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

HTML Attributes Cheat Sheet

This document is a cheat sheet for HTML attributes, listing various attributes along with their corresponding HTML tags and purposes. Examples are provided for each attribute to illustrate their usage. Key attributes include href for links, src for source files, and id for unique identifiers.

Uploaded by

cglprep9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

HTML Attributes Cheat Sheet

Attribute Used In Tag Purpose Example

href <a> Link URL <a href="https://...">

src <img>, <script> Source file <img src="...">

alt <img> Alt text for images <img alt="...">

title Any Tooltip text <p title="...">

id Any Unique identifier <div id="...">

class Any CSS grouping <div class="...">

style Any Inline CSS <p style="...">

type <input>, <button> Defines type <input type="...">

value <input>, <button> Initial value <input value="...">

name <input>, <form> Element name <input name="...">

placeholder <input> Hint text <input placeholder="...">

disabled <input>, <button> Disables element <button disabled>

readonly <input> Read-only input <input readonly>

checked <input type="checkbox"> Pre-check box <input checked>

maxlength <input> Max input length <input maxlength="...">

target <a>, <form> Opens in new tab <a target="_blank">

rel <link>, <a> Link relationship <link rel="...">

width, height <img>, <video> Element size <img width="...">

Page 1

You might also like