Jump to content

Div & Span Tags


lbear

Recommended Posts

In the course Building a Website: Part 5, I am inserting the following code with <div> and <span class> but the <div> creates an extra white space above the tagged area and the span class does not appear bolded in HTML. I am using Bluefish and viewing in Firefox.

 

<p>

If you want to learn webdesign <span class="makeBold"> you have come to the right place </span> here is a list

of the items and lets keep writing stuff to see what happens so that we understand the

difference between a div tag and span tag. <div> Going to keep writing to see if this breaks </div> or just keeps

going on and on and on

</p>

 

HTML View: (As you can see the white space above "Going" and the <span class inserted is not appearing in BOLD. Anyone have any feedback regarding what is causing this?

 

If you want to learn webdesign you have come to the right place here is a list of the items and lets keep writing stuff to see what happens so that we understand the difference between a div tag and span tag.

 

Going to keep writing to see if this breaks

or just keeps going on and on and on

Link to comment
Share on other sites

Hello and thanks for the training! Excited to be here! I think I'm in a div? My other code above these lines should follow suite...

 

<div id="centerdoc">

 

<h3>THE PLACE TO LEARN WEBDESIGN!</h3>

 

<p>If you want to learn webdesign you have come to the right place</p>

 

<h3>THE PLACE TO LEARN WEBDESIGN!</h3>

 

<p>

If you want to learn webdesign <span class="makeBold"> you have come to the right place </span> here is a list

of the items and lets keep writing stuff to see what happens so that we understand the

difference between a div tag and span tag. <div> Going to keep writing to see if this breaks </div> or just keeps

going on and on and on </p>

 

<h3> XXX THE PLACE TO LEARN WEBDESIGN!</h3>

 

</div>

Link to comment
Share on other sites

1342590423[/url]' post='33067']

yay! No spaces...I think I'm good on that.

 

Thanks again I'm sure I will be back for more genius ;-)

 

He didn't say anything about spaces, he said to not put div tags inside p tags.

Link to comment
Share on other sites

Hello Andrea,

 

That is my mother's name. I was trying to accomplish a break in the sentence without it causing a space with the div tag. I was trying to follow the training video closely on this and that is what prompted the question. Maybe it easier to use a <br> tag?

 

Thanks for the feedback.

Link to comment
Share on other sites

1342743192[/url]' post='33085']

Hello Andrea,

 

That is my mother's name. I was trying to accomplish a break in the sentence without it causing a space with the div tag. I was trying to follow the training video closely on this and that is what prompted the question. Maybe it easier to use a <br> tag?

 

Thanks for the feedback.

 

The br tag would be the correct tag for a line break.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...