Menu
×
×
Correct!

Exercise:

Define the text inside the <code> element as preformatted text (to preserve spaces and line breaks).

<p>Code example:</p>

<pre><code>var person = {
  firstName:"John",
  lastName:"Doe"
}</code></pre>

Not Correct

Click here to try again.

Correct!

Next ❯
<p>Code example:</p>

<code>var person = {
  firstName:"John",
  lastName:"Doe"
}</code>




Go to w3schools.com
Reset Score
Close This Menu

Completed 0 of 90 Exercises:

HTML Attributes
HTML Headings
HTML Paragraphs
HTML Styles
HTML Formatting
HTML Quotations
HTML Comments
HTML CSS
HTML Links
HTML Images
HTML Tables
HTML Lists
HTML Classes
HTML Id
HTML Iframes
HTML Scripts
HTML Computercode
HTML Forms
HTML Form Elements
HTML Input Types
HTML Form Attributes





×

Reset the Score?

This will reset the score of ALL 90 exercises.

Are you sure you want to continue?



×

Congratulations!

You have finished all 90 HTML exercises.

Share your score on facebook:



Get Certified!

Take our HTML Developer Certificate to prove that you have fundamental knowledge of web development using HTML.