Professional Documents
Culture Documents
Section HTML - 5
Section HTML - 5
Section HTML - 5
- More tags:
<Marquee bgcolor=color Direction=direction height=n1 width=n2> .. text ..
</Marquee>
.. It makes a text to be moved across the screen
.. color define the background color
.. direction .. The text moving direction, it can be right or left
.. n1, n2 .. the height and width of the Marquee
<pre> -- preformatted text -- </pre>
.. It makes a preformatted text to be written in the page as it is written
Example (20):
Write HTML program that display the following page, using Marquee
Answer:
<HTML>
<Head>
<TITLE> MY WEBPAGE </TITLE>
</HEAD>
<BODY>
<Marquee Direction=left bgcolor=blue height=30 widht=100%> Computer
package </Marquee>
<pre>
C m u e
O p t r </pre>
</BODY>
</HTML>
- Creating Forms:
It allows a more dynamic HTML page
The starting tag<form> and ending tag </form> are included in the body
of the HTML document
Inside the form you can apply any of the following types of control:
1 Text field (single line)
2 Text box (multiple lines)
3 Check box
4 Radio button
5 Password fields
6 File selecting dialogue box
7 Pop – down menu
- General format:
<form> ……… </form>
1 Text field (single line)
<input type=”text” Name=”name” size=n1 value=”value”>
<input type=”submit” Name=”sub_button” value=”submit”>
<input type=”reset” Name=”reset_button” value=”reset”>
.. type, defines type of the control, it can be text, submit, or reset
.. submit, it is a type of control, it causes the form contents to be send to the
server where some scripts can process it
.. reset, it is a type of control, it causes the form contents to be reset and
don’t sent to the server
.. Name, defines the attribute name that will be used by the script for
required processing
.. size, defines the size of the text box to be n1 number
.. value, defines the default value that will be displayed when displaying the
form
2 Text box (multiple lines)
<textarea Name=”name” rows=n1 cols=n2>
Default value written inside the textarea
</textarea>
.. Name, defines the attribute name that will be used by the script for
required processing
.. rows, defines the number of rows of the textarea
.. cols, defines the number of columns of the textarea
3 Check box
<input type=”checkbox” Name=”name” checked> name
.. Name, defines the attribute name that will be used by the script for
required processing
.. type, defines the type of control, it is Check box
.. checked, selects this check box with “√” sign
Example (21):
Answer:
<HTML>
<Head>
<TITLE> MY WEBPAGE </TITLE>
</HEAD>
<BODY>
<form>
Enter your Name: <input type="text" name="1" size=30> <br>
Enter your Address: <textarea name="n1" rows=3
cols=50></textarea><br>
Enter your Code: <input type="text" name="2" size=12> <br>
Select appropriate values: <br>
<input type="checkbox" name="a" checked>Computer package <br>
<input type="checkbox" name="b">Math(2) <br>
<input type="checkbox" name="c" checked>Structured programming <br>
<input type="submit" name="sub" value="Ok">
<input type="reset" name="reset" value="Cancel">
</form>
</BODY>
</HTML>