HTML and Css
HTML and Css
Spring 2015-2016
Ass. Prof. Dr. Pelin GRGEL
([email protected])
17.02.2016
19:37
Grading
19:37
Course Resources
Textbook: How to Program JAVA
Deitel & Deitel
Lecture Slides
Attendance
Attendance at the lectures will not be
taken.
19:37
Outline
HTML
Java Server Faces (JSF)
Java Managed Beans
Database Connection in JSF
SQL Commands
Multithreading in Java
Project Control and Grading
19:37
What is HTML?
19:37
19:37
HTML Tags
19:37
HTML Elements
19:37
HTML Example
<!DOCTYPE html>
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
The DOCTYPE declaration defines the document type
The text between <html> and </html> describes the web page
The text between <body> and </body> is the visible page content
The text between <h1> and </h1> is displayed as a heading
The text between <p> and </p> is displayed as a paragraph
19:37
10
A Web Page
19:37
11
HTML Versions
19:37
12
19:37
13
Common <!DOCTYPE>
Declarations
HTML5
<!DOCTYPE html>
HTML 4.01
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
XHTML 1.0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1transitional.dtd">
19:37
14
HTML Headings
HTML headings are defined with the
<h1> to <h6> tags.
Example
<h1>This is a heading</h1>
<h2>This is a heading</h2>
<h3>This is a heading</h3>
Note:Use HTML headings for headings only. Don't
15
HTML Paragraphs
19:37
16
19:37
17
19:37
18
1.
2.
19:37
19
19:37
20
19:37
21
HTML Layouts
19:37
22
19:37
23
HTML Tables
<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>
19:37
24
Table Size
19:37
25
Table Size
Cellpadding
The "cellpadding" tag specifies (in pixels) the
amount of space between the edges of each cell
and the data inside each cell. Use it within the
starting "table" tag:
Example 1: <table border=1 cellpadding=5>
Example 2: <table border=1 cellpadding=15>
Cellspacing
The "cellspacing" tag specifies (in pixels) the
amount of space between each cell. Use it within
the "table" tag:
Example 1: <table border=1 cellspacing=5>
Example 2: <table border=1 cellspacing=15>
19:37
26
27
HTML Editors
Adobe Dreamweaver
Microsoft Expression Web
CoffeeCup HTML Editor
MS FrontPage
19:37
28
19:37
29
19:37
30