1. Chapter 1- HYPERTEXT MARKUP
LANGUAGE (HTML5)
1. Understand terminologies of web
servers
2. Create web page using HTML5
3. Use hyperlinks to navigate web
page
4. Create table, form and use
frameset in a web page
2. Terminologies of Web Server
Web Page Browser Hyperlink
URL
Domain
Name
IP
Address
HTTP
3. What is HTML?
• HTML is a language for describing web pages.
• HTML stands for Hyper Text Markup Language
• HTML is a markup language
• A markup language is a set of markup tags
• The tags describe document content
• HTML documents contain HTML tags and
plain text
• HTML documents are also called web pages
4. Create Web Page Using HTML5
• Type this:
<!DOCTYPE html>
<html>
<body>
<h1>This is Heading</h1>
<p>This is Paragraph.</p>
</body>
</html>
Define document type
5. Use Hyperlink
• So far we have learned about the HTML5
structure and elements.
• To create a hyperlink, we will be using one of
the HTML5 elements which is element a, short
for anchor.
• The a element is using ”href” (short
for hypertext reference) attribute that will link
the element a to website address, file name or
any part of a file that you specify.
6. Navigate between pages
• The href attribute specifies the destination of
a link.
<a href="http://www.w3schools.com/">Visit W3Schools</a>
7. Navigate within a page
• An anchor with an id inside an HTML document:
<a id="tips">Useful Tips Section</a>
• Create a link to the "Useful Tips Section" inside the same
document:
<a href="#tips">Visit the Useful Tips Section</a>
• Or, create a link to the "Useful Tips Section" from another page:
<a href="http://www.w3schools.com/html_links.htm#tips">
Visit the Useful Tips Section</a>
8. HTML5 Terminologies
• Tags
– Keyword surrounded by angle brackets
– E.g: <html>
• Elements
– Everything between start tag and end tag,
including tags.
– E.g: <p>This is a paragraph.</p>
• Attributes ?????
9. Create table
• 3 important tags:
<table>
- Parent tag to define a html table
<tr>
- Stands for “table row”
- Defined inside table tag
<td>
- Stands for “table data”
- Defined inside tr tag
- Hold contents of each table cell such as text, image,
link or other table
18. Align text in cells (align Attribute)
<table border="1" align="right">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</table>
• deprecated in HTML
4.01
• not supported in
HTML5
• use CSS to align text
19. Align text in cells (using CSS)
• Align every cell in the table
• Align every header cell in the table
td,th {
text-align: center;
}
th {
text-align: center;
}
20. Align text in cells (using CSS)
• Align specific cells in the table
– Add class attribute to td tag:
<td class="centered-cell">
– Add the following to the style sheet
td,th {
text-align: center;
}
21. Frame and Frameset
• Frame
– One section of a
window within a
frameset
• Frameset
– Parent window
which divide a web
page into several frames
22. Create Form
• HTML forms are used to pass data to a server.
• An HTML form can contain input elements like
– text fields
– checkboxes
– radio-buttons
– submit buttons
– select lists
– textarea
– fieldset
– legend
– label
23. The <form> tag
• is used to create an HTML form:
<form>
.
input elements
.
</form>
24. The Input Element
• The most important form element is the
<input> element.
• The <input> element is used to select user
information.
• An <input> element can vary in many ways,
depending on the type attribute.
• An <input> element can be of type text field,
checkbox, password, radio button, submit
button, and more.
25. Text Fields
• <input type="text"> defines a one-line input
field that a user can enter text into:
<form>
First name: <input type="text"
name="firstname"><br>
Last name: <input type="text" name="lastname">
</form>