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.
41module Phlex::HTML::VoidElements
51 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)
101 __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)
151 __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)
201 __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)
251 __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)
301 __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)
351 __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)
401 __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)
451 __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)
501 __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)
551 __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)
601 __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)
651 __register_void_element__ def track(**attributes) = nil
66end