3.3 Coding For The Web
3.3 Coding For The Web
HTML
CSS
Coding for the Web
Basic Web Technologies
• Try it out!
<!DOCTYPE html>
<html>
<head>
<title>Review</title>
</head>
<body><h1>HTML IS AWESOME!?</h1>
<a href="http://en.wikipedia.org/wiki/Black_cat">
<img src="http://s3.favim.com/orig/46/adorable-bat-beautiful-
black-cat-Favim.com-417012.jpg">
</a>
<p>First Lesson is done.</p>
<p>Great Work!</p>
<p>Who wants a break?</p>
</body>
</html>
Coding for the Web
Cascading Style Sheets (CSS)
• Cascading style sheet (CSS): A language/code that
completely separates the text displayed on a Web page
(which is created in HTML code) and information that
describes how to display that text.
</head>
<body>
<p style="background: blue; color: white;">A new background and font color with inline
CSS</p>
</body>
HTML Code: index.html </html>
Coding for the Web
• Try it out!
Protocols
Coding for the Web
HTTP Basics
Why use CSS?
• 2xx: Successful
• This tells the client that the request was successfully processed.
The most common code is 200 OK. For a GET request, the
server sends the resource in the message body. There are other
less frequently used codes:
– 202 Accepted: the request was accepted but may not include the
resource in the response. This is useful for async processing on the
server side. The server may choose to send information for monitoring.
– 204 No Content: there is no message body in the response.
– 205 Reset Content: indicates to the client to reset its document view.
– 206 Partial Content: indicates that the response only contains partial
content. Additional headers indicate the exact range and content
expiration information.
Coding for the Web
URLs: Status
Why Codes
use CSS?
• 3xx: Redirection
• This requires the client to take additional action. The most
common use-case is to jump to a different URL in order to
fetch the resource.
– 301 Moved Permanently: the resource is now located at a new
URL.
– 303 See Other: the resource is temporarily located at a new URL.
The Location response header contains the temporary URL.
– 304 Not Modified: the server has determined that the resource has
not changed and the client should use its cached copy. This relies
on the fact that the client is sending ETag (Entity Tag) information
that is a hash of the content. The server compares this with its own
computed ETag to check for modifications.
Coding for the Web
URLs: Status
Why Codes
use CSS?
All web
browsers
indicate if a
page has a
valid
HTTPS
security
certificate.
Coding for the Web
How Does HTTPS Work?
Why use CSS?
• The most important difference between the two protocols is the SSL certificate. In fact, HTTPS is
basically an HTTP protocol with additional security. However, this additional security can be extremely
important, especially for websites that take sensitive data from its users, such as credit card information
and passwords.
Coding
Benefits for the
of Hypertext
Why use CSS?
Web
Transfer
Protocol Secure
• Common
Commands
Review
Now you can:
• Identify and apply the key factors in the development of
webpages
– Web Hosting and serving
– Web servers and clients
– Web technologies and standards
– Protocols and services
– Types of web content
– Cookies and data storage
– DOM and events
– Vulnerabilities