Jump to content

Question about opening/ending tags...


Kiradikash

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

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

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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...