1 reply [Last post]
Krishmeg
Krishmeg's picture
Offline
newbie
Chennai
Last seen: 5 years 35 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: 15 hours 10 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9759
Points: 3841

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.