RivkaS Posted August 9, 2007 Share Posted August 9, 2007 Dear all,I have stuggled to get a HTML-document together but there are some points that I don't understand, have not learned yet or not found in the tutorials. Here is what I have written: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html xmlns:o="urn:schemas-microsoft-com:office:office"xmlns:w="urn:schemas-microsoft-com:office:word"xmlns="http://www.w3.org/TR/REC-html40"><html><head><title>Clothes</title></head><body bgcolor="#FFCC99"><b><font size="7"; font face="Comic Sans MS"; color=#"990000"><p align="center">Clothes</p></font></b></body></html>Questions:Which attributes are going into the "body"-tag?Which attributes or how many can I add to the "font"-tag?Which attributes go into the "paragraph"-tag?Do I have to use header-tags (h1 - h6) if I use font-size?Thank you for your answers. Link to comment Share on other sites More sharing options...
vchris Posted August 9, 2007 Share Posted August 9, 2007 Which attributes are going into the "body"-tag?There isn't much attribute that go into the body tag. Maybe onload for javascript functions.Which attributes or how many can I add to the "font"-tag?The font tag is deprecated (shouldn't be used anymore), instead use styles (see css fonts).Which attributes go into the "paragraph"-tag?There's a couple attributes that can go in the p tag, style, class, id...Do I have to use header-tags (h1 - h6) if I use font-size?It is best to use header tags and then use styles (css) to resize them and change their colour to your liking. Link to comment Share on other sites More sharing options...
aspnetguy Posted August 9, 2007 Share Posted August 9, 2007 If you plan on doing much of anything once oyu are done learning these tutorials I would suggest forgetting the HTML tutorial and jump into XHTML and CSS tutorials. Link to comment Share on other sites More sharing options...
RivkaS Posted August 9, 2007 Author Share Posted August 9, 2007 Somewhere I read that it is a good idea to learn HTML for the basics and so this is what I am doing. I don't want to jump things because I fear that later on I will not understand things that I see... and I have enough of click-through-programs and HTML-converters - that's not art.... I want to know what I am doing. (yes, I am impossibly old fashioned ) Link to comment Share on other sites More sharing options...
vchris Posted August 9, 2007 Share Posted August 9, 2007 I agree. It is important to learn HTML before you move on to XHTML and such... I sometimes work on projects created a couple years ago by someone else and back then font tags and stuff like that were very common but time changes. Link to comment Share on other sites More sharing options...
RivkaS Posted August 9, 2007 Author Share Posted August 9, 2007 This is what I think and since I would like to work with this one day I would like to know also the basics thoroughly. Link to comment Share on other sites More sharing options...
smartalco Posted August 9, 2007 Share Posted August 9, 2007 i would learn css along with html, since with css, your html file will have almost no attributes in the tags anyway :)either way works, i did learn html before css Link to comment Share on other sites More sharing options...
justsomeguy Posted August 9, 2007 Share Posted August 9, 2007 There is a list of the available attributes on the reference page.http://www.w3schools.com/tags/tag_body.aspThere are optional attributes, standard attributes, and event attributes. Link to comment Share on other sites More sharing options...
RivkaS Posted August 10, 2007 Author Share Posted August 10, 2007 Yes, that looks like something I will play trial and error with, thanks Link to comment Share on other sites More sharing options...
croatiankid Posted August 10, 2007 Share Posted August 10, 2007 I wouldn't even go on to XHTML. Speaking of which, you have xhtml things mixed in that code (try validating it). Link to comment Share on other sites More sharing options...
smartalco Posted August 10, 2007 Share Posted August 10, 2007 I wouldn't even go on to XHTML. Speaking of which, you have xhtml things mixed in that code (try validating it).i wouldn't go onto the xml part of xhtml, but basic things you should be doing already (always closing singe tags for instance, like break (<br />)) Link to comment Share on other sites More sharing options...
croatiankid Posted August 10, 2007 Share Posted August 10, 2007 i wouldn't go onto the xml part of xhtml, but basic things you should be doing already (always closing singe tags for instance, like break (<br />))Why? :)By the way <br /> in HTML should print a line break and ">". Link to comment Share on other sites More sharing options...
RivkaS Posted August 17, 2007 Author Share Posted August 17, 2007 I wouldn't even go on to XHTML. Speaking of which, you have xhtml things mixed in that code (try validating it).I have overlooked this post - can you show me, which tags I have mixed? Link to comment Share on other sites More sharing options...
Guest FirefoxRocks Posted August 20, 2007 Share Posted August 20, 2007 Ok, this looks like one of this Microsoft Word generated documents. Or you have used a Microsoft program to convert it to XHTML or something. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Clothes</title></head><body bgcolor="#FFCC99"><b><font size="7"; font face="Comic Sans MS"; color=#"990000"><p align="center">Clothes</p></font></b></body></html> I removed the XHTML part from your code. Also, this document is completely invalid. For example, you can't have a paragraph inside <b> and <font>, you must have those inside of your paragraph. Also, you have 2 <html> tags in there.I would recommend my easy to use tutorial at http://portal.trap17.com/wdl/. Yes I know it is XHTML, but it is also HTML-compatible which means that you can use that to help you learn HTML better too. Hope it helps! Link to comment Share on other sites More sharing options...
RivkaS Posted August 20, 2007 Author Share Posted August 20, 2007 ......<body bgcolor="#FFCC99"><b><font size="7"; font face="Comic Sans MS"; color=#"990000"><p align="center">Clothes</p></font></b></body>... For example, you can't have a paragraph inside <b> and <font>, you must have those inside of your paragraph. Also, you have 2 <html> tags in there. I think this is getting close to answering my question.A - can you express this differently? I don't understand it.Do I understand that right, that <b> and <font> have to go into the paragraph-tag?(For your link - sorry I won't use it, it would only confuse me completely to read different things at the moment.) Link to comment Share on other sites More sharing options...
Synook Posted August 20, 2007 Share Posted August 20, 2007 Yes, that is right. The <b> and <font> tags are inline tags, and generally cannot contain block elements (such as <p> and <div>). So, it would be correct to say <p><font><b>Text</b></font></p> but incorrect to say <b><font><p>Text</p></font></b> And the <html> element is the root element, everything (except the document type declaration) has to go inside of it, and there can only be one of it. However, you seem to have placed one underneath another. Remove the first one, the attribute information is unneeded. Link to comment Share on other sites More sharing options...
RivkaS Posted August 20, 2007 Author Share Posted August 20, 2007 Next try: Like this? <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">[color="#000080"]<html>[/color][color="#008000"]<head>[/color]<title>Clothes</title>[color="#008000"]</head>[/color][color="#A0522D"]<body bgcolor="#FFCC99">[/color][color="#FF0000"]<p align="center">[/color][color="#9932CC"]<b>[/color][color="#4169E1"]<font size="7"; font face="Comic Sans MS"; color=#"990000">[/color]Clothes[color="#4169E1"]</font>[/color][color="#9932CC"]</b>[/color][color="#FF0000"]</p>[/color][color="#A0522D"]</body>[/color][color="#000080"]</html>[/color] Link to comment Share on other sites More sharing options...
Synook Posted August 20, 2007 Share Posted August 20, 2007 That looks good, except get rid of the semicolons and the second "font" in the <font> tag, and put the hash inside the quotation marks. <font size="7" face="Comic Sans MS" color="#990000"> Link to comment Share on other sites More sharing options...
RivkaS Posted August 21, 2007 Author Share Posted August 21, 2007 So I can add different attributes into one tag without repeating the "font" or "p" or "body"? Link to comment Share on other sites More sharing options...
justsomeguy Posted August 21, 2007 Share Posted August 21, 2007 You don't need to repeat the tag name, everything after the tag name should be an attribute key/value pair.<tagname k1=v1 k2=v2 k3=v3> Link to comment Share on other sites More sharing options...
Synook Posted August 22, 2007 Share Posted August 22, 2007 And don't forget quotation marks! <tagname k1="v1" k2="v2" k3="v3"> Link to comment Share on other sites More sharing options...
RivkaS Posted August 22, 2007 Author Share Posted August 22, 2007 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.