Use p tag inside a div tag for text?

Between two options, there is no difference for SEO. By the way, your question is not about SEO but it's about HTML semantic.

To respect the HTML semantic and unlike you think, the <p> tag exists for displaying paragraphs of text, not text. But in general, texts are displayed in a page through paragraphs. That's why you can use <p> tag inside a <div> HTML element but semantically, it's not an obligation.

Therefore, my answer to your question is: there is no difference for SEO, just use <p> inside a <div> element if your text is cut into paragraphs.


First, I would take all those <p> is more relevant for SEO than <div> with a big grain of salt. SEO really only cares about content relevancy. Putting text in a <div> or in a <p> is not something you should be tweaking. Just go to what is the natural use.

<div> pretty much means 'this is a section of content' while <p> is 'this is a paragraph'. Personally, I just use <div> as it has no internal formatting in any browser, while <p> has some browser-specific formatting (margins, etc.) that can make things look different depending on the browser (unless you use a CSS 'cleaner'). Also, <p> inside <div> adds HTML which makes the pages a bit bigger, and thus, less pages would be crawled at once per crawler 'sweep'.

Worry about the content, not so much about how to write the HTML so search engines 'like it'.


To my knowledge it does matter, for a very simple reason:

A div is short for division, just a part/block on your website, where paragraph is designed for text. In something like a news article, a paragraph's first sentence is important(at least in Dutch language). It has vital information about what that paragraph is about (just think about it, every time you start a new sub-subject, you create a new paragraph where the first sentence is important).

I've been to a Google course, where the 'expert' told us about this principle and that Google that same trick (See, first sentence of new paragraph is important). With that in the back of you mind, it does differ if you use a div or p. Will it increase/decrease you pagerank by 8? No. But the devil is in the details.

Also, you get points for using sementic html. Using P's for paragraphs would help this principle.


In your example you miss the 3rd, and IMO the proper solution:

<p class="box1"> A bunch of text right here</p>

You remove the div and give the class to the paragraph. It does matter how you use your html. Unneeded elements will make the page slow(er), which affects PR.

Tags:

Html

Seo