HTML - Default Attribute Values In Html 4.01
Hi, I am learning HTML and CSS from scratch and I am curious about what the default values are for the many HTML tags that are available. For example, what is the default family-font and font-size for the "body" tag?
Thanks, Similar TutorialsHi, I have got an input form to upload files; the form also accepts some other user input. The upload works fine, but I need to display some filenames by default, but this does not work. I tried using: <input type="file" name="images[]" value="<?php echo $default_filename; ?>"... This did not work, so I tried: <input type="file" name="images[]" value="Testfile.jpg"..., but this does not work too. All this is in a <form action="<?php echo $_PHP_SELF; ?>" method="post" enctype="multipart/form-data">. It seems to me that in an input field of type "file", default values are not accepted, though they should be according to the documentation. Any help will be greatly appreciated as I need this feature. Thanks Hi everone! This is really confusing me a lot.. I have a form in my contact.html page which has labels, inputs, a textarea, & a submit button.. I can see no problem with the submit button, but with the ids of the inputs as well as the textarea, the id keeps adding 0 at the end.. Could anyone help me about this? I thought of a number of things: 1- this could be because the name & the id of the input are the same, so maybe they have to be different & that's why this leading zero comes up automatically everytime. 2- this might affect my php code later. Is it true?? I use XSLT to create a html document, and I'm not THAT familiar with html I want to divide my html page in 2 frames via a frameset. For many reasons I only want ONE html document at the end. I want to create totally new html code in the source URL of a frame, this may sound funny, so here is an example: This is how it normaly looks if I'm correct: HTML Code: <frameset cols="400,*" frameborder="yes" border="5"> <frame name = "leftF" src = "2.html"> <frame name = "rightF" src = "3.html"> </frameset> This is something like I want it to be(because I only want 1 html document): HTML Code: <frameset cols="400,*" frameborder="yes" border=5> <frame name = "leftF" src = "<html><body>This is the 1st frame</body></html>"> <frame name = "rightF" src = "<html><body>This is the 2nd frame</body></html>l"> </frameset> I've tried the above without any success. Does anyone know how to do this, or does anyone have an other suggestion (I don't HAVE to use a frameset, but I don't know any other possibility ). Thank you. Hi, I want to get the dynamic heights of some html divs. I am not programmatically applying height to them (so I don't know their values). If I fetch the height in mozilla I am able to fetch the exact value in px but in case of IE it gives "auto". How do I get their exact values? Please help ---------------------------------- I want to get the dynamic heights of some html divs. I am not programmatically applying height to them (so I don't know their values). If I fetch the height in mozilla I am able to fetch the exact value in px but in case of IE it gives "auto". How do I get their exact values? Please help Natural Detox Hi, I want to get the dynamic heights of some html divs. I am not programmatically applying height to them (so I don't know their values). If I fetch the height in mozilla I am able to fetch the exact value in px but in case of IE it gives "auto". How do I get their exact values? Please help ------------------------------ Hey all, [moved to CSS forum] Okay so it may be that I'm just overly tired or just overly wrong in how I coded this one page, but I need you help. I've been working with CSS for quite awhile-using a CSS sheet to populate HTML code that entirely relied on DIV IDs. I have also been using relative positioning until now. I mention this because for the most part this worked in creating mostly identical layouts between IE8, Firefox 3.5, and Safari 3. Today, I decided to code a page using mostly DIV STYLE tags instead of editing the CSS page. I thought this might be more efficient, and it certainly was easier to code. I also used absolute tags instead of relative. Using Dreamweaver CS4's live view everything displayed as it should. So I uploaded it all in Safari and again-everything displayed as it was designed. However, IE8 seemed to display all of the content that was positioned absolutely about 50px too far to the right. Firefox-normally my friend-wouldn't even display to top portion of the page. Since the majority of hits are IE8 (sigh) I have just temporarily coded it to display correctly within that browser-but I need help to figure out what to change so that such a compromise doesn't need to occur. The page is live at my site http://qwertcorp.com/reactivate . There you can see the CSS and HTML code. I will post the raw code in here in a few minutes. I know these are probably just rookie (read: stupid/sloppy) mistakes, but I really want to learn how to avoid this. Thanks so much in advance! I am trying to write code that would allow me to have a list of products and it would be able to enter the amounts specified in boxes and give you the total once you press the total button.... I have pasted bellow what I have written so far... I am trying to figure out how to make it work... Please help me ! <html> <body> <p> Product 1<INPUT type="text" name="A" value="" onChange="A.value"> Product 2<INPUT type="text" name="B" value="" onChange="B.value"> <input type="submit" value="Total"> <input name="answer" type="text" size="4" maxlength="10" onClick="document.calculator.ans.value+='A.value+B.value'"> </p> </body> </html> I can figure the rest of my problem out myself, but this one is really getting to me. In a form, I have to have certain radio buttons, or a select box pass a link into the SQL. The problem I am having is this code: Code: ... value="<img src="http:... ">" doesn't work. I have tried changing it to look like this: Code: value="/<img src=/"http:...../"/>" which still doesn't work. So how can I have a select box or radio buttons that when I choose a picture, it will pass that pictures html link to the next phase? How do I write it out? Could someone be specific please? If you don't understand, tell me what you're not getting and I will try and explain a bit better. HI everyone, I am in process of creating a sample page. I need to pass values from one HTML page and i should get those values in other page. For example i have used two sample pages like, sample.html l<html> <head> <title> My first page </title> </head> <body> <a href="sample1.html" id="1001">Welcome to html </a> </body> </html> sample1.html <html> <head> <title> My second page </title> </head> <body> <a href="sample1.html">Sample HTML page values came here</a></body> </html> I have used those two sample pages and i need to get the value of id="1001" in sample 1.html page could anyone help me to solve this problem. Thanks in advance Regards, Martin Hi, I am checking my webpage html codes for mistakes with this Markup validation service. and I have these lines filled in different lines in my html code. <TABLE id=AutoNumber3 style="BORDER-COLLAPSE: collapse" borderColor=111111 cellSpacing=0 cellPadding=0 width=760 border=0> The above are the original lines with some mistakes. The validator gives me the below given answer to correct myself Error Line 66 column 69: an attribute value must be a literal unless it contains only name characters. ...RDER-COLLAPSE: collapse" borderColor=#111111 cellSpacing=15 cellPadding=5 wid This is second one of the same type <TD vAlign=top borderColor=#ffffff align=left width="100%" bgColor=#ca0000> The above are original lines with some mistakes. The validator gives me the below given answer to correct myself Error Line 73 column 27: there is no attribute "BORDERCOLOR". <TD vAlign=top borderColor=#ffffff align=left width="100%" bgColor=#ca0000> Can somebody tell me what changes should be done in both the original lines. I am unable to understand the mistakes. Please some help? Regards, Mukhtar I have a confusion with the src attribute. When I insert images in my web site using html, what is more correct with the src attribute: to write the relative location of the image on the root directory or write the URL address of that image? Which is the real difference? Hi, I am trying to solve this for few days, but i cant slove it, so frustrated and nervous. Following is my coding: <select name="lang" onChange="form.redirect.value='index.html'; form.submit()" > <option value=0>English</option> <option value=1>English</option> <option value=2>Francais</option> <option value=3>Castellano</option> <option value=4>Deutsch</option> </select> how can i set English as default? yet user can see the Word "English" appear as deafult. HElp me please..Thanks and appreciate for your help :-) In an HTML document, is the name attribute supposed to be unique like the ID attribute? I'm making a page with two identical forms - one at the top, and another at the bottom, and I'm writing a PHP script to take care of the form action. It would just be simpler if I used one name for the duplicate fields in each form, or even the name of the form, for that matter. Is this ok? Hi, If in a web page on a web serer we specify a link attribute and that shows that the presentation of html documents is controlled by that external style sheet,then when users open the web page on client system whether even the external style sheet is sent to local client computer or the remote web server embedds all the style information in one single web page and send only the requested page and not css file? I'm trying to put default values in my Input fields, which are text fields, of course, but I have numeric input values so I want them on the right. Is there any way to do this? here's a snippet of my code so's you can see what I mean: <form action="" id="calculate_form"> <div> <table style="width: 937px; height: 438px;"> <tbody> <tr> <td> Height: (Metres) </td> <td style="text-align: center; vertical-align: top;"> <p><input value="0" name="height" id="height" /> </p> </td> <td> Cement Price/20kg Bag<br /> </td> <td><input value="7" name="cementprice" id="cementprice" /></td> </tr> <tr> <td>Breadth: (Metres)</td> <td style="text-align: center; vertical-align: middle;"> <p><input value="0" name="breadth" id="breadth" /> and so on........... Perhaps it can't be done in HTML? In that case, what could it be done in? i've got a javascript script on this page, to do the calcs. Hi Hope someone can help. I am new to HTML and i am a bit stuck. I have written a Java script to populate a text box with the contents of a directory and what I want to do is to display a gif or picture whilst the data is getting retrieved. My code is (it is in a grid) <TD><textarea name="files" cols="50" rows="20">test</textarea></TD> What I want is to have the box show a pic as default until the script loads the data. Thanks Paul I was just curious when I make a form element, if there is a default name that is set to that form if I do not use the "name=" attribute". I have a document with objects positioned with Absolute values. I want to center the page vertically and horizontally. Is there any way to change the default X and Y, so that the page will display where I want it to? Thank so much. Rick Hi everyone, haven't posted in a while, but I'm having trouble with a tricky little problem. I've tried Googling for it and such, but it's difficult because I don't even really know what to search for, or even if what I'm trying to find exists at all. I'm coding a website for my friend's stepdad. He doesn't have a server right now (because of money restrictions) so I'm doing it all as offline htm/css/js files, that I'm going to email to him when I'm done with the betas (do unfinished webfiles count as betas?) Anydangway, because I don't necessarily know where he's going to save the files (I don't even know if he has a specific name for his hard drive) I can't be sure that I'll get the right directory if I say, instruct his browser to find in c://suchandsuchafolder/website because A) he may unwittingly save the files somewhere else and his hard drive may be not even be labelled C I suppose I could give him very specific instructions as to where to save it all, (he's not very computer savy) but the problem there is that he's planning on showing the website to the job center in the hopes they'll give him some funding to get it online, and if they decide they want a copy of the files themselves THEY'LL need to save it in a specific location themselves. So what I'm looking for is some sort of anchor attribute (possibly, like I said, I have no idea if such a thing even exists) that could tell a browser to get a file from the same folder that the document that linked to it was saved in. That way I could just instruct him (and by proxy he could instruct the job center) to just save the files in the same folder, and they'd work on any old computer they were saved on. Like I said, I'm not even sure if that is something that exists, nor am I sure if it would be found within HTML, and not some other language instead. But it does sound as though it would be the kind of thing that may be a real thing, so if anyone knows something that sounds like what I'm talking about, or if anyone has an alternate solution to this problem, please let me know! Thanks in advance yo. PS: I apologize for the fairly vague thread title. I couldn't think of any other way to describe the problem more specifically in a concise way. |