Lab Manual 1.1 Intro To HTML
Lab Manual 1.1 Intro To HTML
Lab Manual 1.1 Intro To HTML
WEB TECHNOLOGIES
1 Objective
The purpose of this document is to give a practical implementation of HTML, the
whole overview of HTML tags and element, with example and live implementation
during lab.
2 HTML
• HTML tags are keywords (tag names) surrounded by angle brackets like
<html>
• HTML tags normally come in pairs like <b> and </b>
• The end tag is written like the start tag, with a forward slash before the tag
name
• Start and end tags are also called opening tags and closing tags
The purpose of a web browser (Chrome, Internet Explorer, and Firefox) is to read
HTML documents and display them as web pages. The browser does not display the
HTML tags, but uses the tags to interpret the content of the page.
Page 1
COMSATS University Islamabad, Lahore Web Technologies
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>This is a Heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
Page 2
COMSATS University Islamabad, Lahore Web Technologies
HTML Paragraphs
The HTML <p> element defines a paragraph:
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
Page 3
COMSATS University Islamabad, Lahore Web Technologies
HTML Images
HTML Forms
HTML Input Types
<input type="button">
<input type="checkbox">
<input type="color">
<input type="date">
<input type="datetime-local">
<input type="email">
<input type="file">
<input type="hidden">
<input type="image">
<input type="month">
<input type="number">
<input type="password">
<input type="radio">
<input type="range">
<input type="reset">
<input type="search">
<input type="submit">
<input type="tel">
<input type="text">
<input type="time">
<input type="url">
<input type="week">
Page 4
COMSATS University Islamabad, Lahore Web Technologies
<!DOCTYPE html>
<html>
<body>
<h2>Text field</h2>
<p>The <strong>input type="text"</strong> defines a one-line
text input field:</p>
<form action="/action_page.php">
First name:<br>
<input type="text" name="firstname">
<br>
Last name:<br>
<input type="text" name="lastname">
<br><br>
<input type="submit">
</form>
</body>
</html>
Page 5
COMSATS University Islamabad, Lahore Web Technologies
3 Exercise
Create sample page like given below.
Page 6
COMSATS University Islamabad, Lahore Web Technologies
Page 7