HomeHTML/CSS Selectors
HTML/CSS Selectors
Match tags, classes, IDs, and attributes.
24 Tools Available
Div Tag
Matches div blocks.
/<div[^>]*>[\s\S]*?<\/div>/
Span Tag
Matches span blocks.
/<span[^>]*>[\s\S]*?<\/span>/
Anchor Link
Extracts links.
/<a[^>]+href="([^"]+)"[^>]*>([^<]+)<\/a>/
Image Src
Extracts image paths.
/<img[^>]+src="([^">]+)"/
Script Tag
Matches script blocks.
/<script[^>]*>[\s\S]*?<\/script>/
Style Tag
Matches style blocks.
/<style[^>]*>[\s\S]*?<\/style>/
Class Attribute
Extracts class names.
/class="([^"]*)"/
ID Attribute
Extracts IDs.
/id="([^"]*)"/
Hex Color
Matches CSS hex colors.
/#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/
RGB Color
Matches RGB values.
/rgb\(\d{1,3},\s*\d{1,3},\s*\d{1,3}\)/
HSL Color
Matches HSL values.
/hsl\(\d+,\s*\d+%,\s*\d+%\)/
CSS ID Select
Matches CSS ID selector.
/#[a-zA-Z][a-zA-Z0-9_-]*/
CSS Class Select
Matches CSS Class selector.
/\.[a-zA-Z][a-zA-Z0-9_-]*/
Media Query
Matches media query starts.
/@media[^{]+\{/
Import Rule
Matches CSS imports.
/@import\s+url\(([^)]+)\);/
Meta Tag
Matches HTML meta tags.
/<meta[^>]+>/
Title Tag
Extracts page title.
/<title>([^<]+)<\/title>/
H1-H6 Tags
Matches headings.
/<h[1-6][^>]*>(.*?)<\/h[1-6]>/
Input Field
Matches input tags.
/<input[^>]+>/
Form Action
Extracts form actions.
/<form[^>]+action="([^"]+)"/
Table Row
Matches table rows.
/<tr[^>]*>[\s\S]*?<\/tr>/
List Item
Matches list items.
/<li[^>]*>(.*?)<\/li>/
Comment CSS
Matches CSS comments.
/\/\*[\s\S]*?\*\//
HTML5 Video
Matches video tags.
/<video[^>]*>.*?</video>/