html★ intelligently infers request URLs and methods from standard HTML attributes.

URL Inference

html★ gets the request URL from standard HTML attributes:

ElementURL SourceExample
<a>href<a href="/users">
<form>action<form action="/submit">
<button> in formformaction<button formaction="/save">
Any elementdata-href<div data-href="/api/data">

Priority: data-href > href > action > formaction

Method Inference

The HTTP method is inferred similarly:

ElementMethod SourceDefault
<a>(implicit)GET
<form>methodGET
<button> in formformmethodForm's method
Any elementdata-methodGET

Examples

Links (GET by default)

Forms

Custom Methods

Non-Link Elements

Skip Rules

html★ automatically skips certain elements:

ConditionExampleReason
External URLhref="https://other.com"Different origin
Anchor linkhref="#section"In-page navigation
Download<a download>File download
New windowtarget="_blank"Opens new window
Opt-outdata-target=""Explicitly disabled

Why Inference? By using standard HTML attributes, your markup stays clean and valid. Links work without JavaScript, and html★ enhances them when available. No need for redundant data-url attributes when href already exists!