Content
Html Introduction
Html Tags – IMG, Form, Hyperlinks, Frames, Tables
Exercise
Cascading Style Sheets – Introduction
Advantages of CSS
Types of Style Sheets
Selectors
Key Concepts
Example
Introduction [Contd…]
Web Browser ➨ Establishes the connection to the specified Web server, at the requested URL (Uniform Resource Locator (URL) ➨ Interprets and formats the information found on the server, and displays the formatted information.
Web Server ➨ A computer that delivers/serves Web pages. ➨ Every Web server has an IP address and possibly a domain name. E.g:I f you enter the URL http://www.yahoo.com/index.html in your browser, this sends a request to the server whose domain name is yahoo.com. The server then fetches the page named index.html and sends it to your browser. ➨ Each Web server contains documents that are written in the Hypertext Markup Language (HTML) Requests and responses are exchanged between Web browsers and Webservers using the Hypertext Transfer Protocol (HTTP)
Introduction [Contd…]
Hypertext Transfer Protocol (HTTP) stateless, application level protocol.
HTTP defines how the browser establishes connection to the server the browser requests information from the server the server responds to the browser’s request the server/browser closes the connection
Works on Client-Server architecture
Introduction [Contd…]
Hypertext Markup Language(HTML) ➨
a simple markup language used to define and describe the layout of a web page
Uniform Resource Locator(URL) ➨
standard identifier used to locate information on the Web
➨
elements in a URL – protocol://domain name/filename ➨
hypertext protocol – http://www.microsoft.com/index.html
➨
file transfer protocol – ftp://ftp.dartmouth.org
URL Basics
A uniform resource locator, commonly abbreviated as URL specifies the location of the resource on the internet/intranet or a web application.
URL types:
➨
Absolute URLs
➨
Relative URLs
➨
Fragment URLs
Absolute URLs Absolute URLs use a complete Internet address to give the location of a resource. ➨ Examples: ➨
http://msdn.microsoft.com/support/index.asp http://msdn.microsoft.com/code/welcome.asp?frame=true
URL Basics
Relative URLs Relative URLs are used for accessing files when the full Internet address is unnecessary. ➨ Examples: ➨
index.asp /index.asp welcome.asp?frame=true
Fragment URLs Fragment URLs are used to access to a specific location within a URL. ➨ Examples: ➨
http://www.someplace.com/shopping.html#books
Introduction - HTML Tags
HTML Tags are enclosed in angle brackets,
Attributes are commands added to the tags to specify various options.
Any HTML file should start with the tag and end with the tag
The text between the start and end tags is the element content ➨
HTML tags are not case sensitive, means the same as
HTML file is saved with the extension htm or html ➨
That is filename.htm or filename.html
Introduction - HTML Tags [Contd…] Simple HTML for example, <TITLE>My First HTML Page This is my first HTML Assignment. I should do it correctly.
Introduction - HTML Tags [Contd…] Tag with attributes <TITLE>My First HTML Page This HTML page is designed to explain the attributes of the body tag. bgcolor and text are the attributes of the body tag.
bgcolor="#cccccc" indicates the background color of the html page.
text="#660000" indicates the color of the text.
Using Hyperlinks and Anchors
Uses of Hyperlinks: ➨
Connecting to other HTML pages that are part of a web site or to related material from other Web sites.
➨
Connecting to non-HTML resources, including portable documents such as Adobe Acrobat PDF files or video clips such as QuickTime movies.
Structure of Hyperlinks: ➨
URL description where, http://www.linkfinder.com/ is an URL and is the anchor tag.
➨
Code: Download Adobe Acrobat Reader Output: Download Adobe Acrobat Reader
Adding Images to a Web Page
tag is used to include an image in the web document.
Example Code: Output:
Creating HTML tables
Table is a system of columns and rows.
Using tables you can control precisely how you want your content divided up and where you want it placed.
To create a HTML use a