Hello!,
I’m starting the Responsive Web Certification and I’m working on the technical documentation.
Why the <code>
tag doesn’t work in this example?
It works good with CSS and Javascript code but not with HTML inside.
What I’m doing wrong?
<pre>
<code>
<div class="box">
<div>One</div>
<div>Two</div>
<div>Three
<br>has
<br>extra
<br>text
</div>
</div>
</code>
</pre>
I can’t belive it doesn’t works so in this message.
this is the pen
I was reading the initial issue message and it had no < > anywhere, and then they appeared about 5 minutes later. Internet is having a slow day maybe?
The same appens to me! So I was thinking that the code doen’t work and I post a picture.
So I see that It work on the message but, why doesnt work on pencode, or in other browsers like firefox or Chrome?
My guess is that on this page, those boxes you insert are derived with JS and have to be loaded. Perhaps one of the main servers is having connectivity fluctuations, maybe causing some kind of time out on load? My only guess at the moment
Always avoid using <br>
Use CSS for styling.
Yoy can found my project in codepen, here: /Maruskina/pen/ZPgOZX
Sorry, I’m new and I can’t share links yet.
I insert a comment in the HTML point where I want to insert my code.
/Maruskina/pen/ZPgOZX
br tag was in the original example of code in the MZD page.
I want to show the same code in my page.
I solved it using < and > and not < and > inside the tags.
And now I have also enough points to share links
Very happy.
Keep workin in the project! Thank you to everyone!