html advice
#1
I have a question about best practice in html coding. If I want to separate a heading from a paragraph by 1 line, should I put <p>HEADING</p> PARAGRAPH TEXT ETC ETC or should I put <p>HEADING <p>PARAGRAPH TEXT ETC ETC ??
Also, is it best to use <b> or <strong> for bold text?
Also, is it best to use <b> or <strong> for bold text?
#3
Use <br> for a single line break. Always close your tags too <p> then </p> at the end of the paragraph. so:
<p>
HEADING<br>
PARAGRAPH TEXT ETC ETC
</p>
For XHTML compliance you should use stylesheets for all text formating: <span style="font-weight: bold;">HEADING</span>
For HTML 4.01 <b> and <strong> do the same, <b> is obviously less to type so quicker to code.
It's good practice to use CSS, masses of info and tutorials on http://www.w3schools.com
<p>
HEADING<br>
PARAGRAPH TEXT ETC ETC
</p>
For XHTML compliance you should use stylesheets for all text formating: <span style="font-weight: bold;">HEADING</span>
For HTML 4.01 <b> and <strong> do the same, <b> is obviously less to type so quicker to code.
It's good practice to use CSS, masses of info and tutorials on http://www.w3schools.com
#4
Even better if you link to an external stylesheet.
In style.css:
.heading
{
font-weight: bold;
}
In your page header:
<link href="style.css" rel="stylesheet" type="text/css">
And the body:
<span class="heading">HEADING</span>
That way if you decide you want italic not bold, all you need to do is change the .heading entry in style.css and it affects all your headings defined with the heading class.
In style.css:
.heading
{
font-weight: bold;
}
In your page header:
<link href="style.css" rel="stylesheet" type="text/css">
And the body:
<span class="heading">HEADING</span>
That way if you decide you want italic not bold, all you need to do is change the .heading entry in style.css and it affects all your headings defined with the heading class.
Thread
Thread Starter
Forum
Replies
Last Post
shorty87
Full Cars Breaking For Spares
19
22 December 2015 11:59 AM