lucy24 - 7:49 pm on Nov 13, 2013 (gmt 0)
The <li> is also seen as a paragraph so the <p> does not have to be included?
Depends what you mean by paragraph. A list item is, by default, a block-level element, meaning that it displays on a line by itself. So there would normally be no reason to say
if that's what you were originally thinking of. At least not for search-engine purposes; you might do it for CSS reasons.
You might conceivably have
but only if the list item contains more than one paragraph.
do you mean that when the anchor link on a page is clicked, it takes you to an h2 tag on that page? This might make the local anchor more recognizable to the search engines?
This part is pure hypothesis on my part. On the rare occasions when I get a search-engine visit to a #fragment, the <a> element is-- as far as I can remember-- always inside a header, like
<h3><a name = "blahblah" id = "blahblah">Header Text</a></h3>
I don't know whether search engines actually evaluate anchors differently depending on how they're coded:
--separate <a> tag vs. name/id attribute attached to element itself
--if <a> tag, then inline <a> vs. <a> associated with a block-level element
--"name" attribute vs. "id" attribute *
* I think all modern browsers use id. But SubEthaEdit uses name for its internal navigation, so I continue to use both.