Editing HTML

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 515: Line 515:
  
 
===Form Elements===
 
===Form Elements===
*If we change the input type to '''radio''', it allows the user select only one of a number of choices:
+
If we change the input type to '''radio''', it allows the user select only one of a number of choices:
 
<pre><input type="radio" name="gender" value="male" /> Male <br />
 
<pre><input type="radio" name="gender" value="male" /> Male <br />
 
<input type="radio" name="gender" value="female" /> Female <br /></pre>
 
<input type="radio" name="gender" value="female" /> Female <br /></pre>
  
*The type '''checkbox''' allows the user to select more than one option:
+
The type '''checkbox''' allows the user to select more than one option:
 
<pre><input type="checkbox" name="gender" value="1" /> Male <br />
 
<pre><input type="checkbox" name="gender" value="1" /> Male <br />
 
<input type="checkbox" name="gender" value="2" /> Female <br /></pre>
 
<input type="checkbox" name="gender" value="2" /> Female <br /></pre>
Line 525: Line 525:
 
The '''<input''' tag has no end tag.
 
The '''<input''' tag has no end tag.
  
*The submit button '''submits a form''' to its action attribute:
+
The submit button '''submits a form''' to its action attribute:
 
<pre><input type="submit" value="Submit" /> </pre>
 
<pre><input type="submit" value="Submit" /> </pre>
 
EXAMPLE: The form will include Name, Email, and Message fields. We'll also add a Submit button.
 
 
<pre><!DOCTYPE html>
 
<html>
 
    <head>
 
        <title>My Blog</title>
 
        <link href="https://fonts.googleapis.com/css?family=Handlee" rel="stylesheet">
 
    </head>
 
    <body>
 
        <!-- Form section start -->
 
      <div class="section">
 
            <h1><span>Contact Me</span></h1>
 
            <form>
 
                <input name="name" type="text" /><br/>
 
                <input name="email" type="email" /><br/>
 
                <textarea name="message" ></textarea>
 
                <input type="submit" value="SEND" class="submit" />
 
            </form>
 
        </div>
 
        <!-- Form section end -->
 
    </body>
 
</html></pre>
 
 
This is just a static HTML page, so it won't work to actually submit the form. You'd need to create the server-side code in order to submit a real form and process the data.
 
 
==HTML Colors==
 
HTML colors are expressed as hexadecimal values.
 
 
'''0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F'''
 
As you can see, there are 16 values there, 0 through F. Zero represents the lowest value, and F represents the highest.
 
 
Colors are displayed in combinations of '''red, green, and blue light (RGB).'''
 
 
Hex values are written using the hashtag symbol '''(#)''', followed by either three or six hex characters.
 
 
 
===Color Values===
 
 
All of the possible '''red, green, and blue''' combinations potentially number over 16 million.
 
Few of them:
 
 
<h6>
 
<span style="color:#00FF00">#00FF00</span>
 
</h6>
 
<h6>
 
<span style="color:#F0F00F">#F0F00F</span>
 
</h6>
 
<h6>
 
<span style="color:#F0F0FF">#F0F0FF</span>
 
</h6>
 
<h6>
 
<span style="color:#FFF0F0">#FFF0F0</span>
 
</h6>
 
<h6>
 
<span style="color:#0000F0">#0000F0</span>
 
</h6>
 
 
===Background and Font Colors===
 
The '''bgcolor''' attribute can be used to change the web page's background color.
 
 
This example would produce a dark blue background with a white headline:
 
<pre><html>
 
  <head>
 
      <title>first page</title> 
 
  </head>
 
  <body bgcolor="#000099">
 
      <h1>
 
        <font color="#FFFFFF"> White headline </font>
 
      </h1>
 
  </body>
 
</html></pre>
 
 
==Frames==
 
===The <frame> Tag===
 
A page can be divided into frames using a special frame document.
 
 
The '''<frame''' tag defines one specific window (frame) within a '''<frameset>'''. Each <frame> in a <frameset can have different attributes, such as border, scrolling, the ability to resize, etc.
 
 
The '''<frameset''' element '''specifies the number of columns or rows''' in the frameset, as well as what '''percentage or number of pixels''' of space each of them occupies.
 
<pre><frameset cols="100, 25%, *"></frameset>
 
<frameset rows="100, 25%, *"></frameset></pre>
 
 
===Working with Frames===
 
Use the '''<noresize>''' attribute to specify that a user cannot resize a '''<frame>''' element:
 
<pre><frame noresize="noresize"></pre>
 
 
Frame content should be defined using the src attribute.
 
 
Lastly, the '''<noframes>''' element provides a way for browsers that do not support frames to view the page. The element can contain an alternative page, complete with a body tag and any other elements.
 
<pre><frameset cols="25%,50%,25%">
 
  <frame src="a.htm" />
 
  <frame src="b.htm" />
 
  <frame src="c.htm" />
 
  <noframes>Frames not supported!</noframes>
 
</frameset></pre>
 
 
Example:
 
 
<pre><div class="section">
 
  <h1><span>My Media</span></h1>
 
  <iframe height="150" width="300" src="your video" allowfullscreen frameborder="0"></iframe>
 
        </div></pre>
 
 
== Related ==
 
* [[html2text]]
 
  
 
==See also==
 
==See also==
  
 
*[[CSS]]
 
*[[CSS]]
*[[HTML 5]]
 
* {{HTML}}
 

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Template used on this page:

Advertising: