Web Application Engineering: Lecture 2 - HTML Shahbaz Ahmad
Web Application Engineering: Lecture 2 - HTML Shahbaz Ahmad
Lecture 2 – HTML
Shahbaz Ahmad
HTML (Hyper Text Markup Language)
Markup Language
• It is a set of markup tags or set of characters or symbols
• Define a document’s logical structure or how a document
should be printed or displayed
Lecture 2 - Web Server, URI and HTML
HTML Concepts
HTML Documents
• HTML documents contain HTML tags and plain text
• HTML documents are also called web pages
HyperText
• A method by which you move around on the web - by clicking on
special text called hyperlinks which bring you to the next page.
• You can go to any place on the Internet whenever you want by clicking
on links
• There is no set order to do things in.
Markup
• It is what HTML tags do to the text inside them. They mark it as a
certain type of text .
• HTML tags are keywords (tag names) surrounded by angle brackets like <html>
• HTML tags range from formatting commands to controls that allow user input
• Example
<tagname> content </tagname>
• Example:
<p>This is a paragraph.</p>
XHTML
• The Extensible HyperText Markup Language, or XHTML, is an application of XML
(Extensible Markup Language)
• It doesn’t permit the omission of any tags or the use of attribute minimization
• Basically, XHTML is HTML (all the html tags are found in XHTML) that follows the
rules of XML (because it is a family of XML).
• For example, while <br> is valid in HTML, it would be required to write <br /> in
XHTML.
• Two other important HTML tags are the <head> tag and the
<body> tag
Link
• Link include a information e.g stylesheet in a pag
• <link href="style.css" rel="stylesheet" type="text/css"
media="all">
<p>
– can specify a new paragraph (starts on a
This is another paragraph with a
GAP between new line, preceded by a blank line) using
some of the words. <p>…</p>
</p>
<body>
– <u>… </u> specify underlined
<p>
Text can be emphasized using
<b>bold</b>, <i>italics</i>, or even – <tt>… </tt> specify typewriter-like (fixed-
<big>resizing</big>. <br/> width) font
<u>Underlining</u> text is not
generally recommended since it looks
too much a like a hyperlink. <br/>
The typewriter font is good for
displaying code: – <big>… </big> increase the size of the font
<small><tt>sum = sum + i;</tt></small>
</p>
</body> – <small>… </small> decrease the size of the
font
</html>
</html>
Lecture 2 - Web Server, URI and HTML
Hyperlinks
<html> •perhaps the most important
<!-- page10.html -->
HTML element is the
<head>
<title>Title for Page</title>
hyperlink, or ANCHOR
</head>
– <a href="URL">…</a>
<body>
<p>
<a href="http://www.comsats.edu.pk"> •where URL is the Web address of the page to
COMSATS Institute of Information Technology</a> be displayed when the user clicks on the link
<br>
<a href="page09.html" target="_blank">
Open page09 in a new window</a> •if the page is accessed over the Web, must start
</p> with http://
</body>
<body>
–<a name="ident">…</a>
<p align="center">
[ <a href="#HTML">HTML</a> |
•where ident is a variable for identifying this
<a href="#HTTP">HTTP</a> |
<a href="#IP">IP</a> | location
<a href="#TCP">TCP</a> ]
</p> – <a href="#ident">…</a>
<p>
Computer acronyms:
<dl> •will then jump to that location within the file
<a name="HTML"></a><dt>HTML
<dd>HyperText Markup Language
<a name="HTTP"></a><dt>HTTP – <a href="URL#ident">…</a>
<dd>HyperText Transfer Protocol
<a name="IP"></a><dt>IP
<dd>Internet Protocol •can jump into the middle of another file just as
<a name="TCP"></a><dt>TCP easily
<dd>Transfer Control Protocol
</p>
</body>
</html> Lecture 2 - Web Server, URI and HTML