mozilla

Compare Revisions

Web Console

Change Revisions

Revision 543755:

Revision 543755 by fscholz on

Revision 572215:

Revision 572215 by wbamberg on

Title:
Web Console
Web Console
Slug:
Tools/Web_Console
Tools/Web_Console
Tags:
"Tools", "Web Development:Tools", "Guide", "Security", "Debugging", "web console", "Web Development", "l10n:priority"
"Tools", "Web Development:Tools", "Guide", "Security", "l10n:priority", "Debugging", "web console", "Web Development"
Content:

Revision 543755
Revision 572215
tt637    <h4>
638      Styling messages
639    </h4>
640    <p>
641      Starting in Firefox 31, you can use the <code>"%c"</code> f
 >ormat specifier to style console messages:
642    </p>
643    <pre class="brush: js language-js" data-number="">
644<code class="language-js">console<span class="token punctuation">
 >.</span><span class="token function">log<span class="token punctu
 >ation">(</span></span><span class="token string">"%cMy stylish me
 >ssage"</span><span class="token punctuation">,</span> <span class
 >="token string">"color: red; font-style: italic"</span><span clas
 >s="token punctuation">)</span><span class="token punctuation">;</
 >span></code>
645</pre>
646    <div>
647      <img alt="" src="https://mdn.mozillademos.org/files/7739/co
 >nsole-style.png" style="width: 293px; height: 52px; display: bloc
 >k; margin-left: auto; margin-right: auto;">
648    </div>

Back to History