Questions tagged [pre]

The

 element in HTML represents preformatted text. Text within this element is typically displayed in a non-proportional font exactly as it is laid out in the file. Whitespaces inside this element are displayed as typed. It is usually used for showing computer code or output.

The <pre> element in HTML represents preformatted text. Text within this element is typically displayed in a non-proportional font exactly as it is laid out in the file. Whitespaces inside this element are displayed as typed. It is usually used for showing computer code or output.

384 questions
7
votes
2 answers

HTML, CSS: Display HTML code with ``, `<pre>` or `code`?</a></h3> <div class="excerpt">Among <xmp>, <pre> or <code>, <xmp> have been recommended[1] to display HTML code. Given html such as: <xmp> <div data-role="page" data-theme="b"> <header></header> <div data-role="content"> <ul data-role="listview"…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/html" class="post-tag grid--cell" title="show questions tagged 'html'" rel="tag">html</a> <a href="../../questions/tagged/css" class="post-tag grid--cell" title="show questions tagged 'css'" rel="tag">css</a> <a href="../../questions/tagged/blogger" class="post-tag grid--cell" title="show questions tagged 'blogger'" rel="tag">blogger</a> <a href="../../questions/tagged/pre" class="post-tag grid--cell" title="show questions tagged 'pre'" rel="tag">pre</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Apr 25 '13 at 23:39">asked Apr 25 '13 at 23:39</time> <a href="../../users/1974961/hugolpz" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/1974961.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Hugolpz" /> </a> <div class="s-user-card--info"> <a href="../../users/1974961/hugolpz" class="s-user-card--link">Hugolpz</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">17,296</li> <li class="s-award-bling s-award-bling__gold" title="26 gold badges">26</li> <li class="s-award-bling s-award-bling__silver" title="100 silver badges">100</li> <li class="s-award-bling s-award-bling__bronze" title="187 bronze badges">187</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-14158252"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>7</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>3</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/14158252/avoid-xss-with-an-html-tag-like-pre" class="question-hyperlink">Avoid XSS with an HTML tag like <pre></a></h3> <div class="excerpt">I have a simple webpage that takes query items and crafts them in to the page. Example URL: http://quir.li/player.html?media=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D0VqTwnAuHws The page then has the URL displayed somewhere in the page: <span…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/html" class="post-tag grid--cell" title="show questions tagged 'html'" rel="tag">html</a> <a href="../../questions/tagged/tags" class="post-tag grid--cell" title="show questions tagged 'tags'" rel="tag">tags</a> <a href="../../questions/tagged/xss" class="post-tag grid--cell" title="show questions tagged 'xss'" rel="tag">xss</a> <a href="../../questions/tagged/pre" class="post-tag grid--cell" title="show questions tagged 'pre'" rel="tag">pre</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Jan 04 '13 at 13:38">asked Jan 04 '13 at 13:38</time> <a href="../../users/79485/marcel" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/79485.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Marcel" /> </a> <div class="s-user-card--info"> <a href="../../users/79485/marcel" class="s-user-card--link">Marcel</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">15,039</li> <li class="s-award-bling s-award-bling__gold" title="20 gold badges">20</li> <li class="s-award-bling s-award-bling__silver" title="92 silver badges">92</li> <li class="s-award-bling s-award-bling__bronze" title="150 bronze badges">150</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-11919527"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>7</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/11919527/how-to-skip-mongoose-pre-save-hook" class="question-hyperlink">How to skip mongoose pre-save hook?</a></h3> <div class="excerpt">I have a book model. Here's its schema BookSchema = new Schema({ title: String , lowestPrice: Number }); BookSchema.path('title').required(true); Bookchema.pre('save', function (next) { try { // chai.js …</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/save" class="post-tag grid--cell" title="show questions tagged 'save'" rel="tag">save</a> <a href="../../questions/tagged/hook" class="post-tag grid--cell" title="show questions tagged 'hook'" rel="tag">hook</a> <a href="../../questions/tagged/mongoose" class="post-tag grid--cell" title="show questions tagged 'mongoose'" rel="tag">mongoose</a> <a href="../../questions/tagged/middleware" class="post-tag grid--cell" title="show questions tagged 'middleware'" rel="tag">middleware</a> <a href="../../questions/tagged/pre" class="post-tag grid--cell" title="show questions tagged 'pre'" rel="tag">pre</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Aug 12 '12 at 03:36">asked Aug 12 '12 at 03:36</time> <a href="../../users/911164/trantor-liu" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/911164.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Trantor Liu" /> </a> <div class="s-user-card--info"> <a href="../../users/911164/trantor-liu" class="s-user-card--link">Trantor Liu</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">8,770</li> <li class="s-award-bling s-award-bling__gold" title="8 gold badges">8</li> <li class="s-award-bling s-award-bling__silver" title="44 silver badges">44</li> <li class="s-award-bling s-award-bling__bronze" title="64 bronze badges">64</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-11562465"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>7</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/11562465/indent-code-on-a-web-page-like-in-a-code-editor" class="question-hyperlink">Indent code on a web page like in a code editor?</a></h3> <div class="excerpt">Is it possible to wrap indented code on a web page the way it's done in a code editor? See the screenshot comparison below to better understand what I mean: pre-wrap on a web page: Wrapping of indented lines in a code editor: What I am implying is…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/javascript" class="post-tag grid--cell" title="show questions tagged 'javascript'" rel="tag">javascript</a> <a href="../../questions/tagged/css" class="post-tag grid--cell" title="show questions tagged 'css'" rel="tag">css</a> <a href="../../questions/tagged/pre" class="post-tag grid--cell" title="show questions tagged 'pre'" rel="tag">pre</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Jul 19 '12 at 13:57">asked Jul 19 '12 at 13:57</time> <a href="../../users/1071413/its-me" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/1071413.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="its_me" /> </a> <div class="s-user-card--info"> <a href="../../users/1071413/its-me" class="s-user-card--link">its_me</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">10,998</li> <li class="s-award-bling s-award-bling__gold" title="25 gold badges">25</li> <li class="s-award-bling s-award-bling__silver" title="82 silver badges">82</li> <li class="s-award-bling s-award-bling__bronze" title="130 bronze badges">130</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-10887011"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>7</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>3</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/10887011/javascript-preformatted-text-with-cross-browser-line-breaks" class="question-hyperlink">Javascript preformatted text with cross-browser line breaks</a></h3> <div class="excerpt">I have preformatted strings with line-breaks and multi-spaces and I want to append them into a text node. <pre id="bar"></pre> <script> var string = "Preformatted" + "\n" // \r, \r\n, \n\r or what else? +…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/javascript" class="post-tag grid--cell" title="show questions tagged 'javascript'" rel="tag">javascript</a> <a href="../../questions/tagged/cross-browser" class="post-tag grid--cell" title="show questions tagged 'cross-browser'" rel="tag">cross-browser</a> <a href="../../questions/tagged/line-breaks" class="post-tag grid--cell" title="show questions tagged 'line-breaks'" rel="tag">line-breaks</a> <a href="../../questions/tagged/pre" class="post-tag grid--cell" title="show questions tagged 'pre'" rel="tag">pre</a> <a href="../../questions/tagged/textnode" class="post-tag grid--cell" title="show questions tagged 'textnode'" rel="tag">textnode</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Jun 04 '12 at 19:20">asked Jun 04 '12 at 19:20</time> <a href="../../users/1124866/salvador" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/1124866.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Salvador" /> </a> <div class="s-user-card--info"> <a href="../../users/1124866/salvador" class="s-user-card--link">Salvador</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">786</li> <li class="s-award-bling s-award-bling__silver" title="8 silver badges">8</li> <li class="s-award-bling s-award-bling__bronze" title="21 bronze badges">21</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-8336188"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>6</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>3</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/8336188/how-to-make-a-simple-prettyprint-pre-with-jquery" class="question-hyperlink">How to make a simple prettyprint <pre> with jquery</a></h3> <div class="excerpt"> http://jsfiddle.net/JamesKyle/L4b8b/ I am attempting to make an extremely simple prettyprint function with jQuery, but I do not know how to find elements, attributes, and values (shown in the jsfiddle). I am trying to accomplish the…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/javascript" class="post-tag grid--cell" title="show questions tagged 'javascript'" rel="tag">javascript</a> <a href="../../questions/tagged/jquery" class="post-tag grid--cell" title="show questions tagged 'jquery'" rel="tag">jquery</a> <a href="../../questions/tagged/html" class="post-tag grid--cell" title="show questions tagged 'html'" rel="tag">html</a> <a href="../../questions/tagged/pretty-print" class="post-tag grid--cell" title="show questions tagged 'pretty-print'" rel="tag">pretty-print</a> <a href="../../questions/tagged/pre" class="post-tag grid--cell" title="show questions tagged 'pre'" rel="tag">pre</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Dec 01 '11 at 03:26">asked Dec 01 '11 at 03:26</time> <a href="../../users/847126/james-kyle" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/847126.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="James Kyle" /> </a> <div class="s-user-card--info"> <a href="../../users/847126/james-kyle" class="s-user-card--link">James Kyle</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">4,138</li> <li class="s-award-bling s-award-bling__gold" title="4 gold badges">4</li> <li class="s-award-bling s-award-bling__silver" title="28 silver badges">28</li> <li class="s-award-bling s-award-bling__bronze" title="41 bronze badges">41</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-5825227"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>6</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>3</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/5825227/how-to-make-another-tag-behave-exactly-like-the-pre-tag-using-css" class="question-hyperlink">How to make another tag behave exactly like the pre tag using CSS?</a></h3> <div class="excerpt">I want <code> tags to behave like <pre> tags. But the problem is that I get a line break at the beginning of the block. How do I get rid of that line break? This shows what I mean ... http://jsfiddle.net/6NmPN/ </div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/html" class="post-tag grid--cell" title="show questions tagged 'html'" rel="tag">html</a> <a href="../../questions/tagged/css" class="post-tag grid--cell" title="show questions tagged 'css'" rel="tag">css</a> <a href="../../questions/tagged/pre" class="post-tag grid--cell" title="show questions tagged 'pre'" rel="tag">pre</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Apr 28 '11 at 21:24">asked Apr 28 '11 at 21:24</time> <a href="../../users/725432/justanothernetizen" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/725432.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="JustAnotherNetizen" /> </a> <div class="s-user-card--info"> <a href="../../users/725432/justanothernetizen" class="s-user-card--link">JustAnotherNetizen</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">115</li> <li class="s-award-bling s-award-bling__silver" title="1 silver badges">1</li> <li class="s-award-bling s-award-bling__bronze" title="10 bronze badges">10</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-15066533"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>6</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>2</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/15066533/changing-the-content-of-all-pre-tags-using-javascript" class="question-hyperlink">Changing the content of all <pre> tags using JavaScript</a></h3> <div class="excerpt">I want to know how I change all the pre tags inside a document... I'm using this: var preContent = document.getElementById('code').innerHTML; but this only changes the content of 1 pre tag... the one with the ID 'code'. If you can show me how i can…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/javascript" class="post-tag grid--cell" title="show questions tagged 'javascript'" rel="tag">javascript</a> <a href="../../questions/tagged/html" class="post-tag grid--cell" title="show questions tagged 'html'" rel="tag">html</a> <a href="../../questions/tagged/css" class="post-tag grid--cell" title="show questions tagged 'css'" rel="tag">css</a> <a href="../../questions/tagged/tags" class="post-tag grid--cell" title="show questions tagged 'tags'" rel="tag">tags</a> <a href="../../questions/tagged/pre" class="post-tag grid--cell" title="show questions tagged 'pre'" rel="tag">pre</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Feb 25 '13 at 12:03">asked Feb 25 '13 at 12:03</time> <a href="../../users/2099096/bruno-pinho" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/2099096.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Bruno Pinho" /> </a> <div class="s-user-card--info"> <a href="../../users/2099096/bruno-pinho" class="s-user-card--link">Bruno Pinho</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">85</li> <li class="s-award-bling s-award-bling__gold" title="1 gold badge">1</li> <li class="s-award-bling s-award-bling__silver" title="1 silver badge">1</li> <li class="s-award-bling s-award-bling__bronze" title="5 bronze badge">5</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-9983385"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>5</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/9983385/can-i-have-elements-inside-a-pre" class="question-hyperlink">Can I have elements inside a pre?</a></h3> <div class="excerpt">I want to change the color of a single piece of text inside a <pre>. But I do NOT want to change the color of the whole text I am aware I can style the <pre> like: pre{ ... } But that will apply it to the entire text :( Can I somehow escape a…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/css" class="post-tag grid--cell" title="show questions tagged 'css'" rel="tag">css</a> <a href="../../questions/tagged/escaping" class="post-tag grid--cell" title="show questions tagged 'escaping'" rel="tag">escaping</a> <a href="../../questions/tagged/pre" class="post-tag grid--cell" title="show questions tagged 'pre'" rel="tag">pre</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Apr 02 '12 at 20:30">asked Apr 02 '12 at 20:30</time> <a href="../../users/908879/ajax333221" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/908879.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="ajax333221" /> </a> <div class="s-user-card--info"> <a href="../../users/908879/ajax333221" class="s-user-card--link">ajax333221</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">11,436</li> <li class="s-award-bling s-award-bling__gold" title="16 gold badges">16</li> <li class="s-award-bling s-award-bling__silver" title="61 silver badges">61</li> <li class="s-award-bling s-award-bling__bronze" title="95 bronze badges">95</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-7847465"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>5</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/7847465/pre-tag-won-t-show-text-containing-iframe" class="question-hyperlink"><pre> tag won't show text containing <iframe></a></h3> <div class="excerpt">Why can't I show my <iframe> code line inside a <pre>? I need to show this <iframe> code on a page for people to copy/paste. When I write it within a <pre> tag, it just renders the actual iframe object, rather than outputting the iframe code as…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/html" class="post-tag grid--cell" title="show questions tagged 'html'" rel="tag">html</a> <a href="../../questions/tagged/iframe" class="post-tag grid--cell" title="show questions tagged 'iframe'" rel="tag">iframe</a> <a href="../../questions/tagged/pre" class="post-tag grid--cell" title="show questions tagged 'pre'" rel="tag">pre</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Oct 21 '11 at 09:29">asked Oct 21 '11 at 09:29</time> <a href="../../users/150225/designer-trying-coding" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/150225.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="designer-trying-coding" /> </a> <div class="s-user-card--info"> <a href="../../users/150225/designer-trying-coding" class="s-user-card--link">designer-trying-coding</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">5,994</li> <li class="s-award-bling s-award-bling__gold" title="17 gold badges">17</li> <li class="s-award-bling s-award-bling__silver" title="70 silver badges">70</li> <li class="s-award-bling s-award-bling__bronze" title="99 bronze badges">99</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-50692342"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>5</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/50692342/html-pre-tag-does-not-seem-to-honor-unicode-character-line-separator-u-2028-as" class="question-hyperlink">HTML <pre> tag does not seem to honor Unicode Character 'LINE SEPARATOR' (U+2028) as line break</a></h3> <div class="excerpt">Call me prehistoric but I'm trying to use XHTML document type encoded in a UTF8 html page with a PRE tag containing text with some unicode linebreaks u2028. Firefox at least seems not to honor u2028 as a linebreak in a PRE block. Changing the…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/html" class="post-tag grid--cell" title="show questions tagged 'html'" rel="tag">html</a> <a href="../../questions/tagged/unicode" class="post-tag grid--cell" title="show questions tagged 'unicode'" rel="tag">unicode</a> <a href="../../questions/tagged/line-breaks" class="post-tag grid--cell" title="show questions tagged 'line-breaks'" rel="tag">line-breaks</a> <a href="../../questions/tagged/pre" class="post-tag grid--cell" title="show questions tagged 'pre'" rel="tag">pre</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Jun 05 '18 at 04:58">asked Jun 05 '18 at 04:58</time> <a href="../../users/120163/ira-baxter" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/120163.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Ira Baxter" /> </a> <div class="s-user-card--info"> <a href="../../users/120163/ira-baxter" class="s-user-card--link">Ira Baxter</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">93,541</li> <li class="s-award-bling s-award-bling__gold" title="22 gold badges">22</li> <li class="s-award-bling s-award-bling__silver" title="172 silver badges">172</li> <li class="s-award-bling s-award-bling__bronze" title="341 bronze badges">341</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-48569050"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>5</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>2</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/48569050/hide-remove-first-newline-blank-line-of-html-code-section-using-pre-code-tag" class="question-hyperlink">Hide/Remove first newline/blank-line of html code-section using <pre><code> tag</a></h3> <div class="excerpt">I'm working on a website that has some code and I would like to write: <pre><code> line 1 line 2 </code></pre> But that produces an empty line at the beginning like this as output [A Blank line in here that I don't want] line 1 line 2 I know…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/html" class="post-tag grid--cell" title="show questions tagged 'html'" rel="tag">html</a> <a href="../../questions/tagged/css" class="post-tag grid--cell" title="show questions tagged 'css'" rel="tag">css</a> <a href="../../questions/tagged/newline" class="post-tag grid--cell" title="show questions tagged 'newline'" rel="tag">newline</a> <a href="../../questions/tagged/pre" class="post-tag grid--cell" title="show questions tagged 'pre'" rel="tag">pre</a> <a href="../../questions/tagged/blank-line" class="post-tag grid--cell" title="show questions tagged 'blank-line'" rel="tag">blank-line</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Feb 01 '18 at 18:01">asked Feb 01 '18 at 18:01</time> <a href="../../users/3642914/leonora-tindall" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/3642914.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Leonora Tindall" /> </a> <div class="s-user-card--info"> <a href="../../users/3642914/leonora-tindall" class="s-user-card--link">Leonora Tindall</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">1,391</li> <li class="s-award-bling s-award-bling__gold" title="2 gold badges">2</li> <li class="s-award-bling s-award-bling__silver" title="12 silver badges">12</li> <li class="s-award-bling s-award-bling__bronze" title="30 bronze badges">30</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-46911008"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>5</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>2</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/46911008/angular-4-output-complete-html-syntax-code-in-html-as-raw-text" class="question-hyperlink">Angular 4 Output Complete HTML Syntax code in HTML as raw text</a></h3> <div class="excerpt">I have scoured the possible answers and none of them work. All the innerHTML and PRE tag examples are fine with code or text, but NOT with HTML. Here is EXACTLY what I want to put into a variable: <div [ngStyle]="{'display':'flex',…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/html" class="post-tag grid--cell" title="show questions tagged 'html'" rel="tag">html</a> <a href="../../questions/tagged/css" class="post-tag grid--cell" title="show questions tagged 'css'" rel="tag">css</a> <a href="../../questions/tagged/angular" class="post-tag grid--cell" title="show questions tagged 'angular'" rel="tag">angular</a> <a href="../../questions/tagged/innerhtml" class="post-tag grid--cell" title="show questions tagged 'innerhtml'" rel="tag">innerhtml</a> <a href="../../questions/tagged/pre" class="post-tag grid--cell" title="show questions tagged 'pre'" rel="tag">pre</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Oct 24 '17 at 12:46">asked Oct 24 '17 at 12:46</time> <a href="../../users/5280626/yogi-bear" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/5280626.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Yogi Bear" /> </a> <div class="s-user-card--info"> <a href="../../users/5280626/yogi-bear" class="s-user-card--link">Yogi Bear</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">943</li> <li class="s-award-bling s-award-bling__gold" title="2 gold badges">2</li> <li class="s-award-bling s-award-bling__silver" title="16 silver badges">16</li> <li class="s-award-bling s-award-bling__bronze" title="32 bronze badges">32</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-2337534"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>5</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>4</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/2337534/pre-tag-text-overflows-the-box" class="question-hyperlink">pre tag- text overflows the box</a></h3> <div class="excerpt">I have applied the following style to the pre element: pre { background-color: #FFFFCC; border: 2px dashed #FF6666; padding-top: 7px; padding-bottom: 8px; padding-left: 10px; float: none; padding-right: 10px; …</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/html" class="post-tag grid--cell" title="show questions tagged 'html'" rel="tag">html</a> <a href="../../questions/tagged/css" class="post-tag grid--cell" title="show questions tagged 'css'" rel="tag">css</a> <a href="../../questions/tagged/text" class="post-tag grid--cell" title="show questions tagged 'text'" rel="tag">text</a> <a href="../../questions/tagged/tags" class="post-tag grid--cell" title="show questions tagged 'tags'" rel="tag">tags</a> <a href="../../questions/tagged/pre" class="post-tag grid--cell" title="show questions tagged 'pre'" rel="tag">pre</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Feb 25 '10 at 20:52">asked Feb 25 '10 at 20:52</time> <a href="../../users/281545/mr-and-mrs-d" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/281545.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Mr_and_Mrs_D" /> </a> <div class="s-user-card--info"> <a href="../../users/281545/mr-and-mrs-d" class="s-user-card--link">Mr_and_Mrs_D</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">32,208</li> <li class="s-award-bling s-award-bling__gold" title="39 gold badges">39</li> <li class="s-award-bling s-award-bling__silver" title="178 silver badges">178</li> <li class="s-award-bling s-award-bling__bronze" title="361 bronze badges">361</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-16605840"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>5</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/16605840/multiline-code-block-in-markdown-adds-unwanted-tabs" class="question-hyperlink">multiline code block in markdown adds unwanted tabs</a></h3> <div class="excerpt">today I'm implementing my page in nanoc (haml templates) and I wanted to write some posts in markdown, but when it goes to multiline code blocks something weird is happening - second line in code block has additional tabs. I've tried multiple…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/haml" class="post-tag grid--cell" title="show questions tagged 'haml'" rel="tag">haml</a> <a href="../../questions/tagged/markdown" class="post-tag grid--cell" title="show questions tagged 'markdown'" rel="tag">markdown</a> <a href="../../questions/tagged/codeblocks" class="post-tag grid--cell" title="show questions tagged 'codeblocks'" rel="tag">codeblocks</a> <a href="../../questions/tagged/pre" class="post-tag grid--cell" title="show questions tagged 'pre'" rel="tag">pre</a> <a href="../../questions/tagged/nanoc" class="post-tag grid--cell" title="show questions tagged 'nanoc'" rel="tag">nanoc</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked May 17 '13 at 09:34">asked May 17 '13 at 09:34</time> <a href="../../users/1004946/lukaszkups" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/1004946.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="lukaszkups" /> </a> <div class="s-user-card--info"> <a href="../../users/1004946/lukaszkups" class="s-user-card--link">lukaszkups</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">5,790</li> <li class="s-award-bling s-award-bling__gold" title="9 gold badges">9</li> <li class="s-award-bling s-award-bling__silver" title="47 silver badges">47</li> <li class="s-award-bling s-award-bling__bronze" title="85 bronze badges">85</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="s-pagination pager fr"> <a class="s-pagination--item" href="../../questions/tagged/pre_page=2" rel="prev" title="Go to page 2">Prev </a> <a class="s-pagination--item" href="../../questions/tagged/pre_page=1" rel="" title="Go to page 1">1</a> <a class="s-pagination--item" href="../../questions/tagged/pre_page=2" rel="" title="Go to page 2">2</a> <div class="s-pagination--item is-selected">3</div> <div class="s-pagination--item s-pagination--item__clear">…</div> <a class="s-pagination--item" href="../../questions/tagged/pre_page=25" rel="" title="Go to page 25">25</a> <a class="s-pagination--item" href="../../questions/tagged/pre_page=26" rel="" title="Go to page 26">26</a> <a class="s-pagination--item" href="../../questions/tagged/pre_page=4" rel="next" title="Go to page 4"> Next</a> </div> </div> </div> </div> </div> <script src="../../static/js/stack-icons.js"></script> <script src="../../static/js/fromnow.js"></script> </body> </html>