Forum Moderators: Robert Charlton & goodroi
There are various ways to handle these types of situations. Sometimes to increase the emphasis, I use the <p> tag with in-line styling, as for example:
<p style="font-size: 110%; font-weight: 500"> PUT TEXT HERE </p>
The div element has no special meaning at all. It represents its children. It can be used with the class, lang, and title attributes to mark up semantics common to a group of consecutive elements.
Authors are strongly encouraged to view the div element as an element of last resort, for when no other element is suitable. Use of more appropriate elements instead of the div element leads to better accessibility for readers and easier maintainability for authors.
The span element doesn't mean anything on its own, but can be useful when used together with the global attributes, e.g. class, lang, or dir. It represents its children.
[edited by: Robert_Charlton at 11:17 pm (utc) on Mar 10, 2013]
[edit reason] delinked url, which breaks in our redirect script [/edit]
<h3>Remembering My Summer Vacation</h3>
and define the specific attributes of size, boldness, etc of <h3> in the header.
h1
h2
blahblah
h2
moreblahblah
h2
stillmoreblahblah
"Remembering My Summer Vacation" sounds as if it might be a header, depending on its relationship to the following text.
are you also link to previous pages from "page 2+"?
I prefer to mark up a document using headings, paragraphs, lists, tables (for tabular content) and forms. Those individual "blocks" are then styled using CSS.
When a chunk of content consisting of either a small part of one of the above, or a group of several of the above, has to be styled then it's time for div or span.
h1
introductory overview
h2
text expanding on the first of several "equal" subcategories
h2
text expanding on the second of several "equal" subcategories
h2
text expanding on the third of several "equal" subcategories
etc.
<p>Remembering My Summer Vacation</p>
<p>Name</p>
<p>Email</p>
are all okay in my opinion.
<p>For more information about this subject, go to <a href="URL"><strong>this article</strong></a>.</p>
<div style="font-family: Times New Roman; font-size: 14 px;">
<p>Text here</p>
<p>Text here</p>
<p>Text here<p>
</div> [edited by: Robert_Charlton at 7:32 am (utc) on Mar 14, 2013]
[edit reason] fixed typo at poster request [/edit]
I think that what you recommend (<p> tag) is how I will code Remembering My Summer Vacation. And would it be okay to make the text size of this bigger? I can have a few classes for paragraphs in an external style sheet, one for a regular paragraph and another for the few words at the top, and make the latter one a larger text size.
For the signature, can I use one <p> tag and do the following:
<p>Name<br/>
Email</p>
<p>For more information about this subject, go to <a href="URL"><strong>this article</strong></a>.</p>
Would you make the text size of this sentence the same as that of the 3 regular paragraphs? Also, by putting the anchor text in a <strong> tag or <b> tag, do you think that it could be seen as over optimization? Maybe if the anchor text is a keyword phrase. If you say that the text size of this paragraph should be bigger than the 3 regular paragraphs, then the anchor text will be bigger, and it will be in bold. If a keyword phrase is used, could it be over optimization?
Can I put images in the body text section inside a <div> tag or should I use a <p> tag or something else?
fyi the <center> tag was deprecated in HTML4 and is considered a non-conforming element in HTML5.
<p>For more information about this subject, go to <a href="URL"><strong>this article</strong></a>.</p>
i agree with g1smd's suggestion and i think a "previous page" link in this list would be useful for the reader.
i would suggest you consider using the link element in your document head to define the relationship among the collection of documents with some structure.
@aristotle,
I am thinking of making this paragraph larger than the other paragraphs in the body text, but not bolding the anchor text. Would this be okay?
I am also thinking of using the same larger text for <p>Remembering My Summer Vacation</p>? Would it be okay to do this?
So these two paragraphs would be larger than the other paragraphs in the body text and would be the same larger size.
<p>For more information about this subject, go to <a href="URL"><strong>this article</strong></a>.</p>
My question is more about would using a larger font size for the first and last paragraphs in the body text be okay, and since the last paragraph has a link, would using a larger font size be considered over optimization if the anchor text contains keywords or related keywords or even if it is generic?
My question is more about would using a larger font size for the first and last paragraphs in the body text be okay, and since the last paragraph has a link, would using a larger font size be considered over optimization if the anchor text contains keywords or related keywords or even if it is generic?
You may also want to think about whether the paragraph is larger because of its position or because of its content. That is, if you rearranged all the paragraphs, would the same set of words still be bigger?
while the "position" approach might be
h2 + p {font-size et cetera}
or
div.somename p:first-child {font-size and so on}
or probably a couple other approaches, depending on your individual situation.
If you have multiple pages that all have the same overall look, make a style that will fit all of them so you don't have to keep tweaking things on every page.