Lecture
Difference Between Span and P Tags
The <span> tag and the <p> tag are both used when dealing with text.
The main difference between these two tags is that the <p> tag places text on a new line for each use, while the <span> tag allows text to remain on the same line with other elements.
Using the <p> tag will automatically position text on a new line each time it's used.
However, the <span> tag will keep text inline, even when used multiple times.
Example of span Tag
<span>Hello</span> <span>Nice to meet you</span>
In the above code, "Hello" and "Nice to meet you" will be displayed on the same line.
On the other hand, the <p> tag positions text on a new line each time it is used.
Example of p Tag
<p>Hello</p> <p>Nice to meet you</p>
In this example, "Hello" and "Nice to meet you" will each be on separate lines.
Lessons in this chapter ยท Creating Navigation
- 1. What is a Container?
- 2. What is Navigation?
- 3. Styling the Navigation Bar
- 4. Styling Navigation div
- 5. Create a Logo
- 6. Difference Between span and p Tags
- 7. Creating a Menu
- 8. Configuring Menu Items
- 9. Styling the Menu
- 10. Creating a Button
- 11. Styling Buttons
- 12. Common Button Style
- 13. primary, secondary button styles
- 14. How to Style Buttons and Add Icons in Menus
Lecture
AI Tutor
Design
Upload
Notes
Favorites
Help