question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

img tag uses XHTML and not HTML5

See original GitHub issue

This 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:closed
  • Created 7 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
spockecommented, Sep 9, 2016

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

0reactions
Tarun80commented, Sep 9, 2016

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found