The HTML capture attribute allows a user's camera to be accessed with just HTML, specifically on mobile devices. When a user interacts with an input element with the capture attribute, it opens the device's camera instead of the default file picker. The attribute can be set to 'user' or 'environment' to access the front or back camera, respectively. This feature is useful for mobile users who need to take a picture or video for upload.