0% found this document useful (0 votes)
7 views2 pages

HTML Tags and Attributes Guide

This document is a reference guide for HTML tags, attributes, and elements, detailing their usage and placement within an HTML document. It lists various components such as <html>, <head>, <body>, and common elements like headings, paragraphs, and forms, along with their respective attributes. The information is structured to assist users in understanding where and how to implement these HTML components effectively.
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)
7 views2 pages

HTML Tags and Attributes Guide

This document is a reference guide for HTML tags, attributes, and elements, detailing their usage and placement within an HTML document. It lists various components such as <html>, <head>, <body>, and common elements like headings, paragraphs, and forms, along with their respective attributes. The information is structured to assist users in understanding where and how to implement these HTML components effectively.
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

HTML Tags, Attributes, and Elements Reference

Component Use Where to Use

<html> Root of HTML document Encloses all other HTML content

<head> Contains meta info, links, title Inside <html>, before <body>

<title> Title shown in browser tab Inside <head>

<meta> Metadata like charset or viewport Inside <head>

<link> Links to external resources like CSS Inside <head>

<style> Embed CSS styles Inside <head> or <body>

<script> Embed or reference JavaScript Inside <head> or <body>

<body> Main content of HTML document Inside <html>

<h1> to <h6> Headings Inside <body>

<p> Paragraph Inside <body>

<a> Anchor, hyperlink Inside <body>

<img> Image Inside <body>

<div> Block container Inside <body>

<span> Inline container Inside <body>

<ul> Unordered list Inside <body>

<ol> Ordered list Inside <body>

<li> List item Inside <ul> or <ol>

<table> Table Inside <body>

<tr> Table row Inside <table>

<td> Table cell Inside <tr>

<th> Table header cell Inside <tr>

<form> Form container Inside <body>

<input> Input field Inside <form>

<textarea> Multi-line text input Inside <form>

<button> Clickable button Inside <form> or <body>


<select> Dropdown menu Inside <form>

<option> Option in dropdown Inside <select>

class Defines CSS class Any HTML element

id Unique identifier Any HTML element

href URL for link <a>, <link>

src Source URL <img>, <script>

alt Alternative text <img>

title Tooltip text Any HTML element

style Inline CSS Any HTML element

type Defines input type <input>, <button>, <script>

value Defines field value <input>, <button>, <option>

name Form field name <input>, <textarea>, <select>

placeholder Hint for input <input>, <textarea>

action Form submission URL <form>

method HTTP method for form <form>

You might also like