Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

html advice

Thread Tools
 
Search this Thread
 
Old 17 April 2003, 03:08 PM
  #1  
Mike R
Scooby Regular
Thread Starter
 
Mike R's Avatar
 
Join Date: Aug 1999
Posts: 42
Likes: 0
Received 0 Likes on 0 Posts
Post

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?
Old 17 April 2003, 03:14 PM
  #2  
SJ_Skyline
Scooby Senior
 
SJ_Skyline's Avatar
 
Join Date: Apr 2002
Location: Limbo
Posts: 21,922
Likes: 0
Received 1 Like on 1 Post
Smile

best practice to close your tags </p>

<b> <strong> - not to sure (sure one of the uber-css guys will be better help!)
Old 17 April 2003, 03:17 PM
  #3  
AdrianFRST
Scooby Regular
 
AdrianFRST's Avatar
 
Join Date: Oct 2000
Posts: 368
Likes: 0
Received 0 Likes on 0 Posts
Post

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
Old 17 April 2003, 03:20 PM
  #4  
AdrianFRST
Scooby Regular
 
AdrianFRST's Avatar
 
Join Date: Oct 2000
Posts: 368
Likes: 0
Received 0 Likes on 0 Posts
Post

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.
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Pro-Line Motorsport
Car Parts For Sale
48
21 July 2017 09:50 PM
shorty87
Full Cars Breaking For Spares
19
22 December 2015 11:59 AM
B0DSKI
Non Car Related Items For sale
2
27 September 2015 06:58 PM
Pro-Line Motorsport
Car Parts For Sale
0
27 September 2015 11:21 AM
shorty87
Other Marques
0
25 September 2015 08:52 PM



Quick Reply: html advice



All times are GMT +1. The time now is 06:20 PM.