Vikram Singh: An Introduction To Web Technologies
Vikram Singh: An Introduction To Web Technologies
Web Technologies
Vikram Singh
Asst. Professor,
Department of IT, JECRC, Jodhpur
Internet and WWW
<html>
<head><title>Welcome onboard</title></head>
<body bgcolor=“#f4f4f4">
<h1>Welcome</h1>
<img src=“dcetech.gif" width=“222" height=“80" alt=“DCETECH"
BORDER="0“ />
<h2>A Message from the Speaker </h2>
<p><font color=red>Good evening! Thank you for coming here!
</font></p>
<p>Hello and welcome to Web technologies workshop! I'm <b>Ankit
Jain,</b>, 4th year Computer Engg <a
href=“http://dcetech.com"> Head DCETECH.COM </a>. Dcetech is a
student portal and only one of its kind in India.It is not
only a technical oriented site which caters only for engineers
but its for students from any background! Also students from
any educational institution can register and join Dcetech.
</p>
. . .
</body>
</html>
Turns into this…
Some HTML Tags example
<html>
<head>
<title>Title bar text</title>
</head>
<body>
<p>Look, I'm a paragraph!
</p>
</body>
</html>
Attributes and Values
<table border="1">
<tr>
<td>Row 1, Cell 1</td>
<td>Row 1, Cell 2</td>
</tr>
<tr>
<td>Row 2, Cell 1</td>
<td>Row 2, Cell 2</td>
</tr>
</table>
• Ordered (numbered)
– Use <ol>...</ol> tags
• Unordered (bulleted)
– Use <ul>...</ul> tags
• List Items make up both lists
– Use same <li>...</li> tags
• Lists can contain almost anything
– Text, images, paragraphs, links
– Even other (nested) lists, same type or not
Attributes and Values
text only
image only
both
Images (1)
h2 { font-style : italic ; }
property value
selector declaration
– Selector tells the rule what to modify
– Declaration tells the rule how to modify it
CSS Rule Placement
• In a separate .CSS file
– Affects all pages to which it is linked
– .CSS referenced by pages with <link> tag
• In the <head> of an .HTM page
– Affects only page in which it appears
– Rules are coded in <style></style>
container
• In an HTML tag in page <body>
– Affects only text to which it is attached
– Declarations are coded as attribute= "value"
pairs, e.g., style="color: blue;"
Linking To An External CSS
• Do not put <style></style> tags in the .CSS
file; this will prevent it from working
• Add CSS rules as needed; break lines where
necessary; format as desired
• Save as filename.css
• Reference .CSS in <head> of .HTM(s)
<head>
<link rel="stylesheet" type="text/css"
href="mystyles.css">
</head>
Adding Styles To A Single
Page
• Within document's <head>, insert a
<style></style> container
• Code rules exactly as you would in an external .CSS
<head>
<style>
h2 { font-style: italic; color: red; }
p { font-family: "Verdana, Arial, sans-
serif"; font-size: 12pt;
color: blue; }
</style>
</head>
Adding Styles To An HTML Tag
• Within a tag's < >, code an
attribute = "value" pair defining style characteristics
– Tip: Watch out for nested quotes
• What JavaScript is
– Extension to HTML (support depends on browser)
– An accessible, object-based scripting language