br, optional element
The br element is optional.
1 2 3 4 5 6 710 11 12 13 | <!doctype html> <> <> <>...</> </> <> <> </> </> |
1 2 3 4 5 6 710 11 12 13 | <!doctype html> <> <> <>...</> </> <> </> </> |
Video demonstration br, optional element
HTML5 br, optional element, Tutorial
min | video details |
---|---|
00:06 | br element is optional: → it can be absent from the HTML page OR → it can be present |
00:12 | br ABSENT |
00:12 | br element: absent the paragraph below does not contain the <br> tag |
00:19 | test in browser: the paragraph renders on 1 line |
00:29 | br PRESENT |
00:29 | br element: present the 2nd paragraph contains the <br> tag |
00:36 | test in browser: the 2nd paragraph renders on 2 lines |