Core Code
Modern Dev Handbook
☰
HTML Contents
✕
HTML Guide
HTML Home
HTML Introduction
HTML Editors
HTML Basic
HTML Elements
HTML Attributes
HTML Headings
HTML Paragraphs
HTML Styles
HTML Formatting
HTML Quotations
HTML Comments
HTML Colors
HTML CSS
HTML Links
HTML Images
HTML Favicon
HTML Page Title
HTML Tables
HTML Lists
HTML Block & Inline
HTML Div
HTML Classes
HTML Id
HTML Buttons
HTML Iframes
HTML JavaScript
HTML File Paths
HTML Head
HTML Layout
HTML Responsive
HTML Computercode
HTML Semantics
HTML Style Guide
HTML Entities
HTML Symbols
HTML Emojis
HTML Charsets
HTML URL Encode
HTML vs. XHTML
Forms
HTML Forms
HTML Form Attributes
HTML Form Elements
HTML Input Types
HTML Input Attributes
Input Form Attributes
Graphics
HTML Canvas
HTML SVG
Media
HTML Media
HTML Video
HTML Audio
HTML Plug-ins
HTML YouTube
Web APIs
HTML Web APIs
HTML Geolocation
HTML Drag and Drop
HTML Web Storage
HTML Web Workers
HTML SSE
HTML
→
HTML Id
Basic ID Example
Example showing how to assign an id to an element.
Preview
Code
<h2 id="title">Page Title</h2> <p>This element has a unique id.</p>
More HTML Id Examples (4)
Styling with ID
Anchor Link with ID
Access Element by ID
Unique ID Usage
Styling with ID →