lib/phlex/html/void_elements.rb
Lines
100%14 of 14 covered
Branches
โ0 of 0 covered
Methods
โ0 of 0 covered
| 1 | # frozen_string_literal: true | |
| 2 | ||
| 3 | # Void HTML elements don't accept content and never have a closing tag. | |
| 4 | 1 | module Phlex::HTML::VoidElements |
| 5 | 1 | extend Phlex::SGML::Elements |
| 6 | ||
| 7 | # Outputs an `<area>` tag. | |
| 8 | # [MDN Docs](https://developer.mozilla.org/docs/Web/HTML/Element/area) | |
| 9 | # [Spec](https://html.spec.whatwg.org/#the-area-element) | |
| 10 | 1 | __register_void_element__ def area(**attributes) = nil |
| 11 | ||
| 12 | # Outputs a `<base>` tag. | |
| 13 | # [MDN Docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base) | |
| 14 | # [Spec](https://html.spec.whatwg.org/#the-base-element) | |
| 15 | 1 | __register_void_element__ def base(**attributes) = nil |
| 16 | ||
| 17 | # Outputs a `<br>` tag. | |
| 18 | # [MDN Docs](https://developer.mozilla.org/docs/Web/HTML/Element/br) | |
| 19 | # [Spec](https://html.spec.whatwg.org/#the-br-element) | |
| 20 | 1 | __register_void_element__ def br(**attributes) = nil |
| 21 | ||
| 22 | # Outputs a `<col>` tag. | |
| 23 | # [MDN Docs](https://developer.mozilla.org/docs/Web/HTML/Element/col) | |
| 24 | # [Spec](https://html.spec.whatwg.org/#the-col-element) | |
| 25 | 1 | __register_void_element__ def col(**attributes) = nil |
| 26 | ||
| 27 | # Outputs an `<embed>` tag. | |
| 28 | # [MDN Docs](https://developer.mozilla.org/docs/Web/HTML/Element/embed) | |
| 29 | # [Spec](https://html.spec.whatwg.org/#the-embed-element) | |
| 30 | 1 | __register_void_element__ def embed(**attributes) = nil |
| 31 | ||
| 32 | # Outputs an `<hr>` tag. | |
| 33 | # [MDN Docs](https://developer.mozilla.org/docs/Web/HTML/Element/hr) | |
| 34 | # [Spec](https://html.spec.whatwg.org/#the-hr-element) | |
| 35 | 1 | __register_void_element__ def hr(**attributes) = nil |
| 36 | ||
| 37 | # Outputs an `<img>` tag. | |
| 38 | # [MDN Docs](https://developer.mozilla.org/docs/Web/HTML/Element/img) | |
| 39 | # [Spec](https://html.spec.whatwg.org/#the-img-element) | |
| 40 | 1 | __register_void_element__ def img(**attributes) = nil |
| 41 | ||
| 42 | # Outputs an `<input>` tag. | |
| 43 | # [MDN Docs](https://developer.mozilla.org/docs/Web/HTML/Element/input) | |
| 44 | # [Spec](https://html.spec.whatwg.org/#the-input-element) | |
| 45 | 1 | __register_void_element__ def input(**attributes) = nil |
| 46 | ||
| 47 | # Outputs a `<link>` tag. | |
| 48 | # [MDN Docs](https://developer.mozilla.org/docs/Web/HTML/Element/link) | |
| 49 | # [Spec](https://html.spec.whatwg.org/#the-link-element) | |
| 50 | 1 | __register_void_element__ def link(**attributes) = nil |
| 51 | ||
| 52 | # Outputs a `<meta>` tag. | |
| 53 | # [MDN Docs](https://developer.mozilla.org/docs/Web/HTML/Element/meta) | |
| 54 | # [Spec](https://html.spec.whatwg.org/#the-meta-element) | |
| 55 | 1 | __register_void_element__ def meta(**attributes) = nil |
| 56 | ||
| 57 | # Outputs a `<source>` tag. | |
| 58 | # [MDN Docs](https://developer.mozilla.org/docs/Web/HTML/Element/source) | |
| 59 | # [Spec](https://html.spec.whatwg.org/#the-source-element) | |
| 60 | 1 | __register_void_element__ def source(**attributes) = nil |
| 61 | ||
| 62 | # Outputs a `<track>` tag. | |
| 63 | # [MDN Docs](https://developer.mozilla.org/docs/Web/HTML/Element/track) | |
| 64 | # [Spec](https://html.spec.whatwg.org/#the-track-element) | |
| 65 | 1 | __register_void_element__ def track(**attributes) = nil |
| 66 | end |