HTML5 allows either <br> or <br/>. Does the W3C specification or any other authority state whether one is preferable over the other? Is there a good reason (or reasons) to use one over the other if adherence to XHTML is irrelevant?
HTML5 void elements' ending / is optional, but is it preferable?
591 Views Asked by at. At
2
There are 2 best solutions below
Related Questions in HTML
- Delay in loading Html Page(WebView) from assets folder in real android device
- Why does a function show up as not defined
- CSS Class is not applying to element (border width,color,and style attributes)
- How to sort these using Javascript or Jquery Most effectively
- how to fill out the table with next values in array with one button
- Automatically closing tags in form input?
- Positioning child at bottom of parent with scroll
- Remove added set of rows
- Website zoomed out on Android default browser
- Twitter Bootstrap horizontal form elements on a line
- http://sigmajs.org/ les mis tutorial - why are my canvases 0 height?
- My navbar is not expanding after collapse
- when a checkbox is checked how to display a different hidden element using javascript
- Gaps Vertically Using Dividers
- Svg containers not positioning properly
Related Questions in TAGS
- How to make a multi model tag_cloud with a join table?
- Inserting template code below code in Handlebars layout.hbs
- Is it possible to access gmail anonymous profile for a logged in user?
- Youtube Google API V3: List Videos not returning video tags
- Winforms control for displaying html text
- git-svn problems creating tags
- Having an archive page with categories and tags
- How to keep comma between tags in _form?
- PHP Comment Tag
- custom WordPress tag.php page .. trying to get tag info
- Pushwoosh: how does it work
- Styling Two Navigation Bars
- git tag -l does not remove deleted tags
- unexpected end of file in html code
- <H2> followed by <Sup>
Related Questions in CODING-STYLE
- Best practices for creating a huge SQL table
- Is there a nicer way to do this?
- Does Elixir have coding standards or an authoritative style guide published by the language developers, like PEP8 or the Erlang Programming Rules?
- Nesting anonymous delegates in C# - how to make code maintainable and readable?
- Converting data structures to other data structures
- Node.js and Q Promises: How can I hand over parameters in a cleaner way?
- What is the meaning of int[]
- Where are line breaks allowed within Haskell expressions?
- VIM - Reformatting indentation and braces
- How can I define a subprocess in the __init__() part in Python?
- How to insert values in STL map within a loop
- Java abstract method: is this bad practice?
- How to use constant powers of 2 readable in c++?
- Good practice to explicitly declare variables without 'much' use in favor of readability?
- Order of functions within a Python source file
Related Questions in W3C
- Namespace and no namespace tag in the same XML is according with the W3C recommendation?
- Is mediaStreamTrack in original w3c specification
- How exactly are HSL colours meant to be written?
- xmlsec with AES-GCM
- Why aren't POST requests always preflighted?
- W3C Validator on Mac OS X sending this error: Can't locate Config/General.pm
- HTML5 void elements' ending / is optional, but is it preferable?
- W3 CSS Validation Error / Font Face
- Skip to content in masterpages sets focus on container
- Text table of permitted content and content categories for HTML 5 elements
- Disable specific W3C Logging Field
- IETF, W3C, etc.: de iure or de facto standards?
- Can't find absolute positioning rules in CSS specification
- How to apply one class to another?
- Is DocumentCSS interface from DOM Level 2 Style Specification implemented anywhere?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
In HTML5 compliant browsers, this makes no difference. I think you would have difficulty citing any resource which preferred
<br />over<br>, slash-trailing image tags, or even closing<path>elements. It is most likely preferable not to have the trailing slash simply because the document takes just that much longer to fetch from the webserver and for the HTML interpreter to serialize (as minuscule a time differential as this actually provides). In addition, all HTML5 compliant browsers strip these characters in runtime, which is evident when you callouterHTMLon an HtmlElement.EDIT: I also think that if there was any difference or adherance to a standard to preserve, it would be reflected on the w3c page: https://www.w3.org/wiki/HTML/Elements/br
However, I feel as though it is worth mentioning that browsers that are not compliant with HTML5 standards (mostly earlier, unsupported versions of IE) demand a trailing slash to render the element.