- 1
How do you use span to format a word in a paragraph. Also what is div?đ” Can someone please help?
3 Answers
+ 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.