SUMMARY STEPS TO REPRODUCE 1. Context Menu → Create New → HTML File… OBSERVED RESULT File content is: <html> <head> <title></title> <meta content=""> <style></style> </head> <body></body> </html> EXPECTED RESULT File content should be: <!DOCTYPE html> <html> <head lang=""> <meta charset="utf-8"> <title></title> <style></style> </head> <body></body> </html> Note that I also added a lang attribute to head, as recommended here: https://www.w3.org/International/questions/qa-html-language-declarations SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.18.4 KDE Frameworks Version: 5.68.0 Qt Version: 5.14.2
The lang attribute should be set on the html (not head) element.
Oops you’re right, that’s what is being said in the link to the w3 website in my comment. Now that it has been triaged into the frameworks-kio, I can see the file is located here in the repository: https://phabricator.kde.org/source/kio/browse/master/src/new_file_templates/HTMLFile.html;38b9f4189508476ee292609d75254f4395d9babd?as=source
I’ve proposed a patch: <https://phabricator.kde.org/D29084>.
Git commit 5adaa7cba102c8d29146bdba82bdf88250968ba3 by Grzegorz Szymaszek. Committed on 27/04/2020 at 16:04. Pushed by gszymaszek into branch 'master'. Make the HTML file template more useful Summary: This commit removes the empty meta tag and adds the following: * a DOCTYPE declaration, * an html[lang] attribute, * a document charset declaration, * a newline at the end of the document. Adding the DOCTYPE and charset make the template HTML5‐complant. Reviewers: #frameworks, dfaure, ognarb Reviewed By: ognarb Subscribers: kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D29084 M +9 -5 src/new_file_templates/HTMLFile.html https://commits.kde.org/kio/5adaa7cba102c8d29146bdba82bdf88250968ba3