1 reply [Last post]
Krishmeg
Krishmeg's picture
Offline
newbie
Chennai
Last seen: 5 years 51 weeks ago
Chennai
Timezone: GMT+5.5
Joined: 2014-09-27
Posts: 1
Points: 2

I am a beginner to css and I have a question .
is the HTML <p> and the display :block in the CSS have the same effect?
Kindly share your expertise

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 1 day 2 hours ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9767
Points: 3849

The p element is a block

The p element is a block level element and defaults to {display: block;}. But, don't confuse yourself. The html tags say what the element is. CSS says how the element will be presented.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.