Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I found this question, which seems to suggest I can just paste in my HTML, but when I try that it just looks like HTML, it does not render. Below is what I am pasting in:

<pre style="background:rgba(238,238,238,0.92);color:#000">&lt;?php
$stmt <span style="color:#00f">=</span> $dbConnection<span style="color:#00f">-></span>prepare(<span style="color:#093">'<span style="color:#00f">SELECT</span> <span style="color:#00f">*</span> <span style="color:#00f">FROM</span> employees <span style="color:#00f">WHERE</span> name <span style="color:#00f">=</span> ?'</span>);
$stmt<span style="color:#00f">-></span>bind_param(<span style="color:#093">'s'</span>, $name);

$stmt<span style="color:#00f">-></span>execute();

$result <span style="color:#00f">=</span> $stmt<span style="color:#00f">-></span>get_result();
<span style="color:#00f">while</span> ($row <span style="color:#00f">=</span> $result<span style="color:#00f">-></span>fetch_assoc()) {
    <span style="color:#06f;font-style:italic">// do something with $row</span>

Does anyone know what I need to do to get it to actually render?

share|improve this question
Are you actually trying to embed some PHP code with highlighting? – Tom Horwood Oct 4 '13 at 12:30
Yes exactly. Just to clarify, I don't expect it to execute or anything. I just want to have PHP code on the page with colored text. – Abe Miessler Oct 4 '13 at 15:07

Google docs won't actually render HTML, or execute any code pasted into it. What you can do is view your HTML as a page in the browser, which will show:

php code

Copy it from the web page, then paste into your document - it will look like this:

PHP pasted to Google docs

The question you referred to was for people who wanted to present their HTML code within the document with syntax highlighting, not have it rendered.

share|improve this answer

Add Editey apps to your Google Drive. (Editey, CSS Editey, HTML Editey and JsEditey).

"editEy apps on google drine

share|improve this answer
Why don't you show us an example of prettified HTML code in a Google Document? – Jacob Jan Tuinstra Jan 4 '14 at 18:41
Are you affiliated with this product? If so, you need to disclose that in your post. Please see the help center. – Al E. Jan 4 '14 at 19:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.