Topic: html-and-css

List of available languages to use here with the markdown editor
Category: html-and-css
By: Jeremy Faucher

GitHub react-syntax-highlighter AVAILABLE_LANGUAGES_PRISM.MD

wrap your code in three back ticks like:


Your JavaScript code...


Do we need to use the HTML figure tag with out the figcaption for all media?
Category: html-and-css
By: jeremy-two


<figure> <video controls width="320" height="240"> <source src="video.mp4" type="video/mp4"> Your browser does not support the video tag. </video> <figcaption>Video Caption</figcaption> </figure>

The figure tag adds more meaning semantics to the HTML document when compared to the image tag.

According to to the Free Code Camp forum we should be keeping the figcaption with the figure tag even if we are not using it.

What is the CSS white-space used for
Category: html-and-css
By: jeremy-one

The CSS property white-space controls how whitespace and line breaks within an element are displayed. The default value for white-space is normal, which collapses multiple spaces and line breaks into a single space and wraps text as needed.

In this mode, multiple spaces and line breaks are treated as a single space.

CSS Tricks has a complete guide to white-space

Preserve line breaks when getting text from a textarea
Category: html-and-css
By: jeremy-one

The first easiest option is to simply style the element you're inserting the text into with the following CSS property:

white-space: pre-wrap;