img tag uses XHTML and not HTML5
See original GitHub issueThis can also be seen in the demo on the homepage of TinyMCE.
<img src="images/glyph-tinymce@2x.png" alt="TinyMCE" width="110" height="97" />
For HTML5 it should be:
<img src="images/glyph-tinymce@2x.png" alt="TinyMCE" width="110" height="97">
A couple sources: W3Schools HTML5 Tutorial
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
HTML: <img> tag
This HTML tutorial explains how to use the HTML element called the img tag with syntax and examples. The HTML img tag defines...
Read more >5.4 Closing the Image Tag
For this reason, a suggestion would be state that XHTML requires the self-closing tag, but make it clear that HTML5 does not use...
Read more >HTML <img> tag is not working
+1 to the question :) Let's try like this: using a page really XHTML 1.0 Strict compliant, <?xml version="1.0" encoding= ...
Read more >HTML 4.01 and XHTML 1.0 Reference: <img> Tag
The <img> tag is used to embed an image into a web page. The image to display is specified by the src attribute....
Read more >Write HTML, the HTML Way (Not the XHTML Way)
You may not use XHTML (anymore), but when you write HTML, you may be more influenced by XHTML than you think. You are...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
What is correct is defined by the HTML5 specification both
and
are valid so we are not going to change the default behavior if it comes down to a matter of taste. If the HTML5 spec required us to change that would be another case.
Spec where this is defined “then there may be a single “/” (U+002F) character”: https://www.w3.org/TR/html5/syntax.html#start-tags
However we already have an option to allow you to get the html tags you want: https://www.tinymce.com/docs/configure/content-filtering/#element_format
Demo: http://fiddle.tinymce.com/Q6faab
Now that option is perfect! Wish I was able to find the docs when I searched earlier for this.
Thank you very much for that useful information @spocke! I’ll make sure it forces html5.