Professional Documents
Culture Documents
HTML
HTML
◦ <TITLE>Title of Page</TITLE>
◦ </HEAD>
◦ </HTML>
HTML Headings
HTML headings are defined with the
<h1> to <h6> tags.
HTML Paragraphs
HTML paragraphs are defined with the
<p> tag.
1. Unordered Lists
2. Ordered Lists
3. Description Lists
Unordered Lists
The UL element defines an unordered list, and the LI element
defines each list item.
<ul> Output
<li>First list item</li> •First list item
<li>Second list item</li> •Second list item
<li>Third list item</li> •Third list item
</ul>
<ol> Output
<li>First list item</li> 1. First list item
<li>Second list item</li> 2. Second list item
<li>Third list item</li> 3. Third list item
</ol>
Output
HTML
Hypertext Markup Language
CGI
Common Gateway Interface
Hyperlink
A hyperlink is an element, a text, or an image
that you can click on, and jump to another
document.
links are defined with the <a> anchor tag
(Target point)
<a name="Anchorname">a named anchor</a>
E-mail sending
<a href="mailto:info@example.com">send
mail</a>
Table
Tables are defined with the <table> tag.
The caption element defines a caption for a table.
Tables are divided into table rows with
the <tr> tag.
Table rows are divided into table data with
the <td> tag.
A table row can also be divided into table
headings with the <th> tag.
<table>
<caption>Student List</caption>
<tr><th>Rollno</th><th>Name</th></tr>
<tr><td>1</td><td>Amit</td></tr>
<tr><td>2/td><td>Anu</td></tr>
</table>
Table cont.
type: Indicates the type of input control and for text input
control it will be set to text.
name: Used to give a name to the control which is sent to
the server to be recognized and get the value.
value: This can be used to provide an initial value inside
the control.
size: Allows to specify the width of the text-input control
in terms of characters.
maxlength: Allows to specify the maximum number of
characters a user can enter into the textbox.
Password input controls
type: Indicates the type of input control and for checkbox input
control it will be set to checkbox.
name: Used to give a name to the control which is sent to the
server to be recognized and get the value.
value: The value that will be used if the checkbox is selected.
checked: Set to checked if you want to select it by default.
Radio Button Control
Radio buttons are used when out of many options, just one
option is required to be selected. They are also created using
HTML <input> tag but type attribute is set to radio.
Same as checkbox control but in this the name of the controls are
same if they belong to same group.
Example
<html>
<head>
<title>Checkbox & Radio Button Control</title>
</head>
<body>
<form>
Choose Subjects:
<input type = "checkbox" name = "maths" value = "on"> Maths <input
type = "checkbox" name = "physics"> Physics
Gender:
<input type = "radio" name = “gender" value = “Male"> Male
<input type = "radio" name = " gender " value = “Female"> Female
</form>
</body>
</html>
Select Box Control
A select box, also called drop down box which provides option to
list down various options in the form of drop down list, from
where a user can select one or more options using <option> tag
For example, following hidden form is being used to keep current page number.
When a user will click next page then the value of hidden control will be sent
to the web server and there it will decide which page will be displayed next
based on the passed current page.
<html>
<head>
<title>File Upload Box</title>
</head>
<body>
<form> <p>This is page 10</p>
<input type = "hidden" name = "pagename" value = "10" />
<input type = "submit" name = "submit" value = "Submit" />
<input type = "reset" name = "reset" value = "Reset" />
</form>
</body>
</html>
Frames in HTML
HTML frames are used to divide your browser window into multiple
sections where each section can load a separate HTML document. A
collection of frames in the browser window is known as a frameset.
The window is divided into frames in a similar way the tables are
organized: into rows and columns.
Disadvantages of Frames
There are few drawbacks with using frames, so it's never
recommended to use frames in your webpages
Some smaller devices cannot cope with frames often because
their screen is not big enough to be divided up.
Sometimes your page will be displayed differently on different
computers due to different screen resolution.
The browser's back button might not work as the user hopes.
There are still few browsers that do not support frame
technology.
Frames in HTML cont.
Creating Frames
To use frames on a page we use <frameset> tag instead of
<body> tag. The <frameset> tag defines, how to divide
the window into frames. The rows attribute of <frameset>
tag defines horizontal frames and cols attribute defines
vertical frames. Each frame is indicated by <frame> tag
and it defines which HTML document shall open into the
frame.
Frames in HTML cont.
Example
<html>
<head>
<title>HTML Frames</title>
</head>
<frameset rows = "10%,80%,10%">
<frame name = "top" src = "/html/top_frame.htm" />
<frame name = "main" src = "/html/main_frame.htm"
/>
<frame name = "bottom" src =
"/html/bottom_frame.htm" />
<noframes>
<body>Your browser does not support frames.</body>
</noframes>
</frameset>
</html>
File Upload Box
If you want to allow a user to upload a file to your web site, you
will need to use a file upload box, also known as a file select box.
This is also created using the <input> element but type attribute
is set to file.
<html>
<head>
<title>HTML Target Frames</title>
</head>
<frameset cols = "200, *">
<frame src = “f1.htm" name = “f1“ noresize = "noresize" />
<frame src = “f2.htm" name = “f2" scrolling = "no“ />
<noframes>
<body>
Your browser does not support frames.
</body>
</noframes>
</frameset>
</html>
Iframes in HTML
You can also include a <noembed> tag for the browsers which don't
recognize the <embed> tag.
You can use various media types like Flash movies (.swf), AVI's
(.avi), and MOV's (.mov) file types inside embed tag.
<html>
<head>
<title>HTML embed Tag</title>
</head>
<body>
<embed src = "/html/yourfile.mid" width = "100%" height =
"60" >
<noembed>
<img src = "yourimage.gif" alt = "Alternative Media" >
</noembed>
</embed>
</body>
</html>
Background Audio
You can use HTML <bgsound> tag to play a soundtrack in the
background of your webpage. This tag is supported by Internet
Explorer only and most of the other browsers ignore this tag. It
downloads and plays an audio file when the host document is
first downloaded by the user and displayed. The background
sound file also will replay whenever the user refreshes the
browser.
Note − The bgsound tag is deprecated and it is supposed to be
removed in a future version of HTML.
Background Audio cont.
Example
<html>
<head>
<title>HTML embed Tag</title>
</head>
<body>
<bgsound src = "/html/yourfile.mid">
<noembed>
<img src = "yourimage.gif" >
</noembed>
</bgsound>
</body>
</html>
HTML Layout - Using Tables
</table>
</body>
</html>
HTML Layout cont.
Example 2
<html>
<head>
<title>Three Column HTML Layout</title>
</head>
<body>
<table width = "100%" border = "0">
<tr valign = "top">
<td bgcolor = "#aaaaaa" width = "20%">
<b>Main Menu</b><br />
HTML<br />
PHP<br />
PERL...
</td>
HTML Layout cont.
Example 2 cont.
<td bgcolor = "#b5dcb3" height = "200" width =
"60%">
Technical and Managerial Tutorials
</td>
<td bgcolor = "#aaaaaa" width = "20%">
<b>Right Menu</b><br />
HTML<br />
PYTHON<br />
IOT...
</td>
</tr>
<table>
</body>
</html>
For Reference
https://www.tutorialspoint.com/html
https://www.w3schools.com/html
https://www.geeksforgeeks.org/html-tutorials