Jump to content
Sign in to follow this  
Kiradikash

Question about opening/ending tags...

Recommended Posts

Hello again,I have my site up and running...but a few things aren't working because my bf says I didn't do all of my tags right. I just have a question about opening ending tags.The first thing I know I did wrong was using <p> to make breaks instead of <p> text </p>. I'm currently fixing that. But, I my bf says that since I start my coding for each paragraph like this...<p align="left"> <font face="Comic Sans MS" size="4" color="black"> TextThat I have to finish it like this...Text </font> </p>HERE's my question. If I started my 1st paragraph off like this...<font face="Comic Sans MS" size="4" color="black"> <p align="left"> TEXTCould I leave the <font> tag open until the end of the document (after I have all the text in) to keep from having to type it every line? Example...<font face="Comic Sans MS" size="4" color="black"> <p align="left"> Paragraph </p><p> Paragraph </p><p> paragraph </p> </font>I hope someone will let me know if this is bad coding or not. I hope it's not. Thanks ahead of time to anyone that can help me. Thanks again. Bye!Sincerely,Kiradikash

Share this post


Link to post
Share on other sites

Hi..well..actually, the font tag is a dieing breed..as its been gradually filtered out in favour of CSS.there are tutorials on this site to do with CSS http://www.w3schools.com/css/css_intro.aspi reckon, instead of learning the "older" way, so to speak, i would go for the css way.However, since css has alot in it. I would go for learning what you need. At the moment, the font face, colour and size.That way, you can easily change it if you need to by just changing one or 2 lines of code rather than editing a whole document.Take a look through the tutorials slowly, and work your way through it. If you get stuck, then give us a shout.

Share this post


Link to post
Share on other sites

While I also agree that <font> should not be used, I'll answer your question anyway, because I know you could have placed any inline element, like <span>, but just decided to go with <font>.Normally, to validate, you'd need to close any inline element (span, font) inside a block element (p, div) before you close the block element like in your first example, even though browsers may render it the way you want by using the second example.

Share this post


Link to post
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.

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...
Sign in to follow this  

×
×
  • Create New...