Skip to content

Print the literal text of an HTML file unrendered #218

Answered by PeterWone
davb06 asked this question in Q&A
Discussion options

You must be logged in to vote

No special steps are required.

This is what happened on my system with default settings and your own sample saved into a file sample.html

The renderer that is used will depend on the language identifier determined by VS Code. This is largely determined by the file type extension, so I also tried pasting your HTML into an unsaved document, with this result.

Aside To print HTML "without" rendering requires a renderer. If you send the raw HTML to the browser, it will process it just like any other web page. To make it display as source code you have to put it through the source code renderer, which converts angle brackets and whatnot to HTML entities (< or >) and also does the line …

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by PeterWone
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #216 on May 18, 2023 22:11.