- 1
How do you use span to format a word in a paragraph. Also what is div?😵 Can someone please help?
3 Respuestas
+ 5
If you don’t know how do do something in programming, do this:
1. learn it - Use some kind of course online to learn a topic. If you still don’t know⬇️
2. Practice it- practice with challenges, code coach and codes. If you still don’t know⬇️
3.Search it - Use Google or SoloLearn search bar before asking question. If you still don’t know⬇️
4.Ask - Ask the questions on SoloLearn, Quora, or StackOverflow. If you still don’t know⬇️
5. Sleep- just clear your mind and try these steps again
+ 2
div is a block element that helps you to divide your page into sections so you can style them differently ,
You can do something like this
<p><span >Hello</span><span>World</span><p>
Now you can format each world seperately using some css
span:nth-child(1){
}
span: nth-child(2){
}
The above selectors will select first span and second span of every parent element ,
Or you can give id to different span if you don't want the above behavior ,
But unless you describe what you are trying to do I can't help much
+ 1
<span> is a common "universal" inline container.
<div> is the same but for block.
These tags are used to separate parts of content from others.