Indian Institute of Technology Kharagpur. HTML Part III. Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. I.I.T.

Similar documents
Html basics Course Outline

HTML TAG SUMMARY HTML REFERENCE 18 TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES MOST TAGS

IMY 110 Theme 7 HTML Tables

ITNP43: HTML Lecture 4

Final Exam Study Guide

HTML Summary. All of the following are containers. Structure. Italics Bold. Line Break. Horizontal Rule. Non-break (hard) space.

3.1 Introduction. 3.2 Levels of Style Sheets. - The CSS1 specification was developed in There are three levels of style sheets

- The CSS1 specification was developed in CSS2 was released in CSS2.1 reflects browser implementations

Adding CSS to your HTML

(Refer Slide Time: 01:41) (Refer Slide Time: 01:42)

Chapter 1 Getting Started with HTML 5 1. Chapter 2 Introduction to New Elements in HTML 5 21

Appendix D CSS Properties and Values

HTML and CSS COURSE SYLLABUS

Objectives. Tutorial 8 Designing ga Web Site with Frames. Introducing Frames. Objectives. Disadvantages to Using Frames. Planning Your Frames

CSS: The Basics CISC 282 September 20, 2014

As we design and build out our HTML pages, there are some basics that we may follow for each page, site, and application.

COPYRIGHTED MATERIAL. Contents. Chapter 1: Creating Structured Documents 1

Creating web pages Chapter 5. Structuring contents

A HTML document has two sections 1) HEAD section and 2) BODY section A HTML file is saved with.html or.htm extension

Tutorial 5 Working with Tables and Columns. HTML and CSS 6 TH EDITION

INFS 2150 / 7150 Intro to Web Development / HTML Programming

3.1 Introduction. 3.2 Levels of Style Sheets. - HTML is primarily concerned with content, rather than style. - There are three levels of style sheets

Text and Layout. Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 11. This presentation 2004, MacAvon Media Productions

Chapter 5. Introduction to XHTML: Part 2

Index. CSS directive, # (octothorpe), intrapage links, 26

HTML BEGINNING TAGS. HTML Structure <html> <head> <title> </title> </head> <body> Web page content </body> </html>

recall: a Web page is a text document that contains additional formatting information in the HyperText Markup Language (HTML)

Chapter 4 Notes. Creating Tables in a Website

- The CSS1 specification was developed in CSSs provide the means to control and change presentation of HTML documents

- HTML is primarily concerned with content, rather than style. - However, tags have presentation properties, for which browsers have default values

COMSC-030 Web Site Development- Part 1. Part-Time Instructor: Joenil Mistal

Introduction to WEB PROGRAMMING

CSE 154 LECTURE 3: MORE CSS

CSC 121 Computers and Scientific Thinking

Web Design and Application Development

Introduction to Web Tech and Programming

Tables & Lists. Organized Data. R. Scott Granneman. Jans Carton

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1

Session 4. Style Sheets (CSS) Reading & References. A reference containing tables of CSS properties

A Balanced Introduction to Computer Science, 3/E

frameset rows cols <frameset> rows cols

GIMP WEB 2.0 MENUS. Web 2.0 Menus: Horizontal Navigation Bar with Dynamic Background Image

ACSC 231 Internet Technologies

Certified HTML Designer VS-1027

1 Creating a simple HTML page

Website Development with HTML5, CSS and Bootstrap

1/6/ :28 AM Approved New Course (First Version) CS 50A Course Outline as of Fall 2014

COPYRIGHTED MATERIAL. Contents. Introduction. Chapter 1: Structuring Documents for the Web 1

COMP519: Web Programming Lecture 4: HTML (Part 3)

COMPUTER APPLICATIONS IN BUSINESS FYBMS SEM II

ICT IGCSE Practical Revision Presentation Web Authoring

Introducing Web Tables

CSc 337 LECTURE 3: CSS

CSS. Lecture 16 COMPSCI 111/111G SS 2018

Structure Bars. Tag Bar

HTMLnotesS15.notebook. January 25, 2015

Bixby Public Schools Course Essential Elements Grade: Desktop Publishing

By Ryan Stevenson. Guidebook #2 HTML

ICT IGCSE Practical Revision Presentation Web Authoring

COSC 2206 Internet Tools. CSS Cascading Style Sheets

COMSC-030 Web Site Development- Part 1. Part-Time Instructor: Joenil Mistal

INFS 2150 Introduction to Web Development

INFS 2150 Introduction to Web Development

Welcome Please sit on alternating rows. powered by lucid & no.dots.nl/student

Page Layout Using Tables

c122sep2214.notebook September 22, 2014

CSS Lecture 16 COMPSCI 111/111G SS 2018

HTML TIPS FOR DESIGNING.

<style type="text/css"> <!-- body {font-family: Verdana, Arial, sans-serif} ***set font family for entire Web page***

THE ASIAN SCHOOL. Class-10. ch8. A. Check the Right Answer (1*9)

Deccansoft Software Services

CSS for Styling CS380

LING 408/508: Computational Techniques for Linguists. Lecture 14

Hyper Text Markup Language HTML: A Tutorial

Web Design and Development ACS-1809

Lesson 5 Introduction to Cascading Style Sheets

Basic CSS Lecture 17

Certified HTML5 Developer VS-1029

The internet is a worldwide collection of networks that link millions of computers. These links allow the computers to share and send data.

Chapter 4 Creating Tables in a Web Site Using an External Style Sheet

EECS1012. Net-centric Introduction to Computing. Lecture 3: CSS for Styling

Chapter 1 Self Test. LATIHAN BAB 1. tjetjeprb{at}gmail{dot}com. webdesign/favorites.html :// / / / that houses that information. structure?

To assign a name to a frame, add the name attribute to the frame tag. The syntax for this attribute is: <frame src= url name= name />

1. The basic building block of an HTML document is called a(n) a. tag. b. element. c. attribute. d. container. Answer: b Page 5

Dreamweaver CS3 Concepts and Techniques

1. Lists. 1.1 Unordered Lists. Subject Code 10CS73. Unit 2 XHTML 2, CSS. Subject Programming the Web

Name Related Elements Type Default Depr. DTD Comment

Markup Language SGML: Standard Generalized Markup Language. HyperText Markup Language (HTML) extensible Markup Language (XML) TeX LaTeX

COMP519 Web Programming Lecture 8: Cascading Style Sheets: Part 4 Handouts

Styles, Style Sheets, the Box Model and Liquid Layout

To link to an external stylesheet, the link element is placed within the head of the html page:

ID1354 Internet Applications

1 of 7 11/12/2009 9:29 AM

Chapter 9 Table Basics Key Concepts. Copyright 2013 Terry Ann Morris, Ed.D

1.264 Lecture 12. HTML Introduction to FrontPage

NEW WEBMASTER HTML & CSS FOR BEGINNERS COURSE SYNOPSIS

HTTP and HTML. We will use HTML as a frontend to our webapplications, therefore a basic knowledge of HTML is required, especially in forms.

Zen Garden. CSS Zen Garden

Cascading Style Sheet. Styles as Tag Attributes. Syntax. <h1>: what font type/size is used? STYLE = SELECTOR {RULES} Attributes such as bgcolor

CS 103, Fall 2008 Midterm 1 Prof. Nakayama

Transcription:

Indian Institute of Technology Kharagpur HTML Part III Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. I.I.T. Kharagpur, INDIA Lecture 15: HTML Part III On completion, the student will be able to: 1. Explain the various tags and attributes required to specify a table. 2. Demonstrate the creation of tables with varied degrees of complexity. 3. Explain and demonstrate how frames can be used to make a web page look more attractive. 4. CSS 1

HTML Tables Introduction Tables are made up of cells, arranged into rows. Use tags <TABLE>, <TR>, <TD>. An example: <table> <tr> <td> Good </td> <td> Bad </td> </tr> <tr> <td> Cute </td> <td> Ugly </td> </tr> </table> 2

Good Bad Cute Ugly The Table Tags <TABLE> </TABLE> Defines the beginning and the end of a table. Can have several attributes: bgcolor = #rrggbb or color name rules = all cols rows none border = number height = number, percentage 3

<TR>.. </TR> Defines a row of cells within a table. Can have several attributes: bgcolor = #rrggbb or color name align = left center right justify <CAPTION>.. </CAPTION> Provides a caption for the table. Must immediately follow the table tag, and precede all other tags. <TD>.. </TD> Defines a table data cell. A table cell can contain any content, like an image, or even another table. Can have several attributes: bgcolor = #rrggbb or color name colspan = number == > specifies the number of columns the currect cell should span (default is 1). rowspan = number == > similar 4

<TH>.. </TH> Defines a table header cell. Browsers generally display the contents of the header cells in bold, and centered. Same attributes as the <TD> tag. Table Example 1 <table> <tr> <td colspan=2> Hello </td> </tr> <tr> <td> Good </td> <td> Day </td> </tr> </table> Hello Good Day 5

Table Example 2 <table> <tr> <td rowspan=2> Hello </td> <td> Good </td> </tr> <tr> <td> Day </td> </tr> </table> Hello Good Day Table Example 3 <table border=1> <caption> My Table </caption> <tr> <th> Name </th> <th> Marks </th> </tr> <tr> <td> Anil </td> <td> 72 </td> </tr> <tr> <td> Kamal </td> <td> 58 </td> </tr> </table> Name Anil Kamal Marks 72 58 6

HTML Frames Introduction What are frames? A method for dividing the browser window into smaller subwindows. Each subwindow displaying a different HTML document. How does a page with frame look like? NEXT SLIDE 7

A Web Page that use Frames Merits and Demerits Merits: Allow parts of the page to remain stationary while other parts scroll. They can unify resources that reside on separate web servers. There is a <noframe> tag, using which it is possible to add alternative content for browsers that do not support frames. 8

Demerits: All browsers do not support frames. Documents nested in a frame is more difficult to bookmark. Load on the server can be significantly increased, if there are a large number of frames in the page. Frames are very difficult to handle for search engines. The Frame Tags <FRAMESET>.. </FRAMESET> Defines a collection of frames or other framesets. Attributes: cols = list of lengths (number, %, or *) rows = list of lengths (number, %, or *) Establishes the number and sizes of columns (vertical frames) or rows (horizontal frames) in a frameset. In number of pixels, percentage of total area, or relative values (*) based on available space. 9

<FRAME> Defines a single frame within a frameset. Attributes: frameborder = 1 0 src = url scrolling = yes no auto marginwidth = number marginheight = number name = text <NOFRAMES> </NOFRAMES> Specifies the contents to be displayed by browsers that cannot display frames. Ignored by browsers that support frames. 10

Frame Example 1 <html> <head><title> A document with frames </title> </head> <frameset cols = *,* > <frame src = left.htm > <frame src = right.htm > </frameset> <noframes> Browser does not support frames. </noframes> </html> Frame Example 2 <html> <head><title> Another one with frames </title> </head> <frameset cols = 100,2*,* > <frame src = left.htm > <frame src = right.htm > </frameset> <noframes> Browser does not support frames. </noframes> </html> 11

Frame Example 3 <html> <head> <title> Nested frames </title> </head> <frameset cols = 25%, * <frame src = one.htm > <frameset rows = 100,150,100 > <frame src = two.htm > <frame src = three.htm > <frameset cols = *,* > <frame src = four.htm > <frame src = five.htm > </frameset> </frameset> </frameset> </html> Linking to a Framed Document When a hyperlink is clicked, by default, the new page is loaded into the same frame. We can load the linked page into a new frame also. M E N U 12

Assign a name to the targeted frame. <frame src = somepage.htm name = abc > Specify this frame in a hyperlink as follows: <a href = newpage.htm target= abc > </a> The document newpage.htm will load into the frame names abc. Cascaded Style Sheets (CSS) 13

Introduction Style sheets in HTML allows us to specify typography styles and spacing instructions for elements on a page. Key concept: How to define rules? How to attach those rules to one or more HTML documents? How to specify a rule? Some examples: H2 {color: blue} P {font-size: 12pt; font-family: Verdana, sans-serif; } 14

Inline Styles <H2 style = color: blue > This will appear as blue. </H2> <P style = font-size: 12pt; font-family: Verdana, sans-serif > This paragraph will be set as per the specified Style. </P> Embedded Style Sheets <html><head> <style type = text/css > <! - - H2 {color: blue} P {font-size: 12pt; font-family: Verdana, sans-serif; } --> </style> 15

<title> Example of using style sheets </title> </head>.. </html> External Style Sheets The most powerful way. Collect all styles in a separate text document. Creates links to that document. <head> <link rel = STYLESHEET href = /pathname/mystyle.css type = text/css > </head> 16

There is more. We have just given a brief introduction to CSS. There are many different ways to specify properties. To resolve conflicts in style definitions, cascading rules are defined. Specify which definition is to be given priority. 17

SOLUTIONS TO QUIZ QUESTIONS ON LECTURE 14 Quiz Solutions on Lecture 14 1. What are the tags used for unnumbered lists? <UL> </UL>, and <LI> 2. What are the tags used for ordered lists? <OL> </OL>, and <LI> 3. How can you change the bullet style in an unnumbered list? By specifying an attribute along with the <UL> or <LI> tags. The possible values are disc, circle, and square. 18

Quiz Solutions on Lecture 14 4. Show hyperlink definitions that provide link to a pdf file, and a jpeg image. <a HREF =./slides/new/chap5.pdf > Ch5 </a> <a HREF = images/rose.jpg > Green Rose </a> 5. Can relative URL s be used to provide link to a different web site? No. When referring to a document located on some other server, the name of the server must be specified. In other words, absolute URL must be given. Quiz Solutions on Lecture 14 6. How can you provide a hyperlink to a section in the same document? Step 1: Specify a named section in the document. <a name= tennis > <h2>about tennis</h2> </a> Step 2: Provide link to the named section. <a href= #tennis > Information on Tennis </a> 19

Quiz Solutions on Lecture 14 7. How can you provide a hyperlink to a section in a document located on some other web server? Provide a link to the named section using an absolute URL. <a href= http://www.sunny.com/xyz.html #tennis > Information on Tennis </a> Quiz Solutions on Lecture 14 8. What do the HEIGHT and WIDTH attributes in the IMG tag specify? They specify the height and width of the image (in pixels) in the browser window. The browser can resize the image using these values. 9. How can you provide an image hyperlink? An example is shown below: <a HREF = india.html > <img src =./images/ india.gif > </a> 20

QUIZ QUESTIONS ON LECTURE 15 Quiz Questions on Lecture 15 1. What are the HTML tags associated with table definitions? 2. How do you specify table entries spanning multiple columns? 3. What is the purpose of the <FRAMESET> tag> 4. What is the purpose of the <NOFRAMES> tag? 5. What does * signify when specifying the width/height of a frame? 6. What does % signify when specifying the width/height of a frame? 21

Quiz Questions on Lecture 15 7. What is inline style for specifying style sheets? Give an example. 8. What is external style for specifying style sheets? 22