0
I'm still a learner in html5 seeking professional level...please i need someone to rectify my code
Why did the <span> tag in line 8not work when I ran the codešŖš„š„? I've seen people use it Or is it not supported in html5? I am confused...check out the code please and reply https://code.sololearn.com/W5VX47rq1F5l/?ref=app
5 Answers
+ 1
What were/are you expecting the span to do?
+ 1
To draw a kinda box around the goal
I thought that's what it's used for?
though I am not sure but I see that from codes given in the tutorial examples
+ 1
span is an inline element!! It doesn't add any effect in the code!! But you can add class in span and then you can decorate that with CSS or JS!!
And you can use: border:5px solid red; to create a border around your element, it might be looked like a box!!š
š
https://www.sololearn.com/discuss/704076/?ref=app
https://www.sololearn.com/discuss/1469413/?ref=app
+ 1
Okay ... thanks guys
I'm yet to learn css
Will do that as soon as I'm through with HTML
0
Yeah, like AL was saying, span didn't really have a noticeable default style / effect. You will want to add your own.
Also, since h1 typically has a default bold font-weight, wrapping it with strong is a bit redundant. If you're using span, typically you would use it for only some of the words in the element, not all. Otherwise, you might as well just apply the box (border) to the h1 itself.
I recommend learning CSS with HTML.