Web
#html
#tag
#web
#parsing
HTML Tag
Matches an HTML opening or self-closing tag with optional attributes.
✓ HTML sanitization✓ Template parsing✓ Web scraping
✓ Valid Examples
- <div>
- <img src="photo.jpg" alt="Photo" />
- <input type="text" class="form-control">
✗ Invalid Examples
- </div>
- <!-- comment -->
- <123invalid>
Usage & Integration
Validate HTML Tag natively in your backend or frontend without copying regex strings.
Node / Edge
import { validate } from '@regexto/validators';
validate('html-tag', '...');Python
from regexto_validators import validate
validate("html-tag", "...")Go
import "github.com/regex-to/validators-go"
valid, err := validators.Validate("html-tag", "...")PHP
use RegexTo\Validators\Validator;
Validator::validate('html-tag', '...');Rust
use regexto_validators::validate;
let is_valid = validate("html-tag", "...").unwrap();