CREATED BY : VIRAL M.KORADIYA. Anchor elements are defined by the element. The element accepts several attributes, but either the Name or HREF attribute.

Slides:



Advertisements
Similar presentations
HTML I. HTML Hypertext mark-up language. Uses tags to identify elements of a page so that a browser such as Internet explorer can render the page on a.
Advertisements

Session 2 Introduction to HyperText Markup Language 4 (HTML 4) Matakuliah: M0114/Web Based Programming Tahun: 2005 Versi: 5.
Internet Basics & Way Beyond!
HTML popo.
Internet Services and Web Authoring (CSET 226) Lecture # 5 HyperText Markup Language (HTML) 1.
HTML popo.
INTRODUCTION TO HYPERTEXT MARKUP LANGUAGE 1. Outline  Introduction  Markup Languages  Editing HTML  Common Tags  Headers  Text Styling  Linking.
HTML Tags. Bolding Text Or Italics Text Or
Tutorial 4: Designing a Web Page with Tables
XP 1 Designing a Web Page with Tables Tutorial 4 Creating a News Page.
Creating a Web Page with Tables. Objectives Create a text table with preformatted text Create the basic structure of a graphical table Organize table.
XP Creating Web Pages with HTML Using Tables. XP Objectives Create a text table Create a table using the,, and tags Create table headers and captions.
Computer Science 1611 Internet & Web Creating Webpages with Style Hypertext and the HTML Markup Language (continued)
Using HTML Tables.
HTML. Goals How to use the Komodo editor HTML coding and testing Basic HTML tags List and Images Tables and Links At least 2 pages and navigation
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 9: Frames © 2007 Prosoft Learning Corporation All rights reserved ITD 110 Web Page Design.
Chapter 6 Working with Frames.
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 9: HTML Frames.
HTML. Creating a Table Attributes: border: indicates the border type of the table Value: 0 (no border), 1, 2, etc. cols: indicates the number of columns.
HTML Tags. Objectives Know the commonly used HTML tags Create a simple webpage using the HTML tags that will be discussed.
1 The Structure of a Web Table beginning of the table structure first row of three in the table end of the table structure table cells You do not need.
ULI101: XHTML Basics (Part III) Introduction to XHTML / Continued … Block-Level vs. Inline Elements (tags) Manipulating Text,  , Text Characteristics,,,,,,,,,,,,,,,
CpSc 462/662: Database Management Systems (DBMS) (TEXNH Approach) HTML Basics James Wang.
CS105 Introduction to Computer Concepts HTML
CHAPTER 11 Tables. How Are Tables Used Data Display  Very tidy and very useful Better Text Alignment  Putting text in tables allows you to format indents.
Chapter 4 Fluency with Information Technology L. Snyder Marking Up With HTML: A Hypertext Markup Language Primer.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Fluency with Information Technology Third Edition by Lawrence Snyder Chapter.
HTML Overview Part 2 – Paragraphs, Headings, and Lines 1.
XP 1 Tutorial 5 Using Frames in a Web Site. XP 2 Tutorial Objectives  Describe the uses of frames in a Web site  Lay out frames within a browser window.
HTML HTML stands for "Hyper Text Mark-up Language“. Technically, HTML is not a programming language, but rather a markup language. Used to create web pages.
HTML HyperText Markup Language Constantly evolving - extra facilities being added regularly Java applets and JavaScript used to increase functionality.
Dr. Nuha El-KhaliliInternet Programming ( ) HTML Hyper Text Markup Language The language of web pages Maintained by the W3C
Chapter 4: Hypertext Markup Language Primer TECH Prof. Jeff Cheng.
HTML Introduction to HTML Tags. HTML Document My first HTML document Hello world!
1 CSC 121 Computers and Scientific Thinking David Reed Creighton University HTML and Web Pages.
DHTML AND JAVASCRIPT Genetic Computer School LESSON 2 HTML TAGS G H E F.
HTML: Tables & Frames Internet Technology1. HTML: Tables Table tags ► surround the entire table ► header row (text is boldfaced) ► surround each row ►
CNIT 132 – Week 7 HTML - Tables. Tables on the World Wide Web A table can be displayed on a Web page either in a text or graphical format. A text table:
Just Enough HTML How to Create Basic HTML Documents.
CS105 INTRODUCTION TO COMPUTER CONCEPTS HTML Instructor: Cuong (Charlie) Pham.
Designing a Web Page with Tables. A text table: contains only text, evenly spaced on the Web page in rows and columns uses only standard word processing.
HTML: Hyptertext Markup Language Doman’s Sections.
Introduction HTML (Hypertext Markup Language) is used to create document on the World Wide Web. HTML is not a programming language, it is a markup language.
HTML: Tables & Frames Internet Technology.
Agenda Block-Level vs. Inline Elements (tags) Manipulating Text,  , Text Characteristics,,,,,,,,,,,,,,, Font Attributes: size, color, face Horizontal.
4 Chapter Four Introduction to HTML. 4 Chapter Objectives Learn basic HTML commands Discover how to display graphic image objects in Web pages Create.
Introduction to HTML Xiangming Mu 9/23/ Learning Objectives Understand basic HTML tags and their attributes Learn to create a simple HTML page.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Adding Graphical Elements Essentials for.
CIS234A- Lecture 7 Instructor Greg D’Andrea. Tables A table can be displayed on a Web page either in a text or graphical format. A text table: – contains.
CIS234A Lecture 8 Instructor Greg D’Andrea. Review Text Table contains only text, evenly spaced on the Web page in rows and columns uses only standard.
CSE 409 – Advanced Internet Technology 1 DISCUSSION OF BASIC HTML TAGS.
Web Development Lecture # 09 Text Formatting in HTML.
HTML FRAMES With Frames, you can display more than one Web page in the same browser window.
HTML CS 105. Page Structure HTML elements control the details of how a page gets displayed. Every HTML document has the following basic structure: … …
What is HTML? HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML is not a programming language, it is a markup.
REEM ALMOTIRI Information Technology Department Majmaah University.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
Web Technology (NCS-504) Prepared By Mr. Abhishek Kesharwani Assistant Professor,UCER Naini,Allahabad.
1 Introduction to HTML. 2 Definitions  W W W – World Wide Web.  HTML – HyperText Markup Language – The Language of Web Pages on the World Wide Web.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
Web111a_chapt04.ppt HTM: Section 4 Tables Table Types Text table elements Easy to use Use fixed-font text (font family monospace) Andale Mono Courier Monaco.
Site Development Foundations © 2004 ProsoftTraining All rights reserved.
1 HTML. 2 Full forms WWW – world Wide Web HTTP – Hyper Text Transfer Protocol HTML – Hyper Text Markup Language.
HTML AN INTRODUCTION TO WEB PAGE PROGRAMMING. INTRODUCTION TO HTML With HTML you can create your own Web site. HTML stands for Hyper Text Markup Language.
Designing a Web Page with Tables
CNIT 131 HTML5 - Tables.
LAB Work 02 MBA 61062: E-Commerce
Font tag and its attributes
Computers and Scientific Thinking David Reed, Creighton University
Using HTML Tables SWBAT: - create tables using HTML
Presentation transcript:

CREATED BY : VIRAL M.KORADIYA

Anchor elements are defined by the element. The element accepts several attributes, but either the Name or HREF attribute is required.

Attribute HREF NAME TARGET

The href Attribute if the HREF (Hypertext Reference) attribute is present, the text between the opening and closing anchor elements becomes a hypertext link. Example: link

The target Attribute The target attribute defines where the linked document will be opened. Example: Visit Google!

The name Attribute When the name attribute is used, the element defines a named anchor inside a HTML document. Named anchor are not displayed in any special way. They are invisible to the reader. Named anchor syntax: Any content The link syntax to a named anchor: Any content

Example: A named anchor inside an HTML document: Useful Tips Section A link to the Useful Tips Section from the same document: Jump to the Useful Tips Section

Line Breaks The line break element specifies that a new line must be started at the given point.

A horizontal rule( ) element is a divider between sections of text, such as a full-width horizontal rule or a similar graphic. Attribute:

Document Tag comment

Body Tag Attribute  bgcolor Example  Text Example

Comment Example of comment hello

Text Formatting Tag to

to HTML defines six levels of heading

The paragraph element indicates a paragraph of text. To align paragraph use ALIGN =left/right/center attribute and values have been added to the element.

The preformatted text element presents blocks of text in fixed-width font and is suitable for text that has been formatted on-screen or in a mono-spaced font.

This tag is specified text should be bold This tag is specified text should be underline.

This tag is specified text should be Italic style. The TeleType element specified that the text be rendered in fixed-width typewriter font where available.

The element states that the enclosed text should be displayed with a horizontal line striking through the text.

The element specifies that the enclosed text should be displayed as a subscript. The element specifies that the enclosed text should be displayed as a superscript.

The element specifies that the enclosed text should be displayed, if practical, using a big font compared with the current font.

The strong element can be used to indicate strong typographic. The element specifies that the enclosed text should be displayed, if practical, using a small font compared with current font.

The tag specifies a default address or a default target for all links on a page. The tag goes inside the head element. Attribute :-HREF Example:

Microsoft internet explorer support different-sized fonts within HTML documents. The element is. Valid values range from 1 to 7. the default font size is 3.

Font attributes Size : 1 to 7 Color : color name & #rrggbb The color attribute sets the color that text appears on screen. #rrggbb is a hexadecimal color denoting an RGB color values. Face : name The face attribute sets the typeface used to display the text on-screen. The typeface displayed already must be installed on the user’s computer.

Example hello or hello or hello  hello

The tag specifies a default font-color, font- size, or font-family for all the text in a document. Example:

Surrounding any text with this element causes the selected text to blink on the viewing page. This can add extra emphasis to selected text. Example this text blink on the page Note: the … element currently is supported only by Netscape browser.

The element allows you to create a region of text that can be made to scroll across the screen. Example: Hello student

Attributes Align This attribute can be set to TOP,MIDDLE and BOTTOM specifies that the text around the marquee should align with the top, middle and bottom of the marquee. Example: hello

Behavior This can be set to SCROLL, SLIDE and ALTERNATE. It specifies how the text displayed in the marquee should behave. Example: hello

Direction This specifies in which direction the text should scroll. The default is LEFT. Which means that the text will scroll to the left from the right-hand side of the marquee. This attribute also set to RIGHT, which causes the marquee text to scroll from the left to the right. Example: hello

Frames With frames, you can display more than one HTML document in the same browser window. Each HTML document is called a frame, and each frame is independent of the others. The disadvantages of using frames are: The web developer must keep track of more HTML documents It is difficult to print the entire page

The Frameset Tag The tag defines how to divide the window into frames Each frameset defines a set of rows or columns The values of the rows/columns indicate the amount of screen area each row/column will occupy

The Frame Tag The tag defines what HTML document to put into each frame

In the example below we have a frameset with two columns. The first column is set to 25% of the width of the browser window. The second column is set to 75% of the width of the browser window. The HTML document "frame_a.htm" is put into the first column, and the HTML document "frame_b.htm" is put into the second column:

Tag Definition and Usage The tag defines a frameset. The frameset element holds two or more frame elements. Each frame element holds a separate document. The frameset element states only how many columns or rows there will be in the frameset.

Example A simple three-framed page:

Attributes COLS = PIXELS OR PERCENTAGE Specifies the number and size of columns in a frameset ROWS = PIXELS OR PERCENTAGE Specifies the number and size of rows in a frameset

Vertical Frame

Horizontal Frame

…….. …… ………

The tag embeds an image in an HTML page. Notice that images are not technically inserted into an HTML page, images are linked to HTML pages. The tag creates a holding space for the referenced image. The tag has two required attributes: src and alt.

Required Attributes Attribute Value Description alt text Specifies an alternate text for an image src URL Specifies the URL of an image

Example:

Optional Attributes Align : Use styles instead Specifies the alignment of an image according to surrounding elements Values : left,right

Border: Specifies the width of the border around an image Value: pixels Height : Specifies the height of an image Value: pixels % Width :Specifies the width of an image Value : pixels %

vspace: Specifies the whitespace on top and bottom of an image Value: pixel hspace: Specifies the whitespace on left and right side of an image Value : pixel

Example: <img src="D:\image3.jpg" width=250 height=500 > <img src="D:\image4.jpg" hspace="200“ vspace="1000">

Table HTML Elements are: ……………. ………… ………………….

TABLE ATTRIBUTE: ALIGN =LEFT, RIGHT, CENTER BGCOLOR=“#RRGGBB /COLORNAME” BORDER =VALUE BORDERCOLOR=“#RRGGBB /COLORNAME” CELLPANDDING=VALUE CELLSPACING=VALUE HEIGHT= PERCENT WIDTH= PERCENT BACKGROUND= IMAGE

CAPTION ATTRIBUTES ALIGN ATTRIBUTE ALIGN=LEFT ALIGN=RIGHT ALIGN=CENTER ALIGN=TOP ALIGN=BOTTOM

,, ATTRIBUTES ALIGN=LEFT / RIGHT / CENTER BACKGROUND=IMAGE BGCOLOR=“#RRGGBB”/COLORNAME BORDERCOLOR =“#RRGGBB”/COLORNAME COLSPAN=VALUE ROWSPAN=VALUE HEIGHT=PERCENT WIDTH=PERCENT NOWRAP

PHP Programming

Topics Background and History of PHP Installation Comments in PHP Variables Conditions Loops Functions File Handling Database Handling (MySQL, MSSQL, ODBC)

Background Personal Home Page – C kind of scripts written in Perl language, by Rasmus Lerdorf in He called the language as PHP/FI – Personal Home Page / Forms Interpreter Version 2.0 was released Then came 3.0, 4.0. They were called PHP simply Recent version is PHP 5.2.3

Installation Apache server need to be installed first The config file for apache server will be present in the conf folder under the apache installed directory Set the DocumentRoot to the path where the PHP files will be stored Install PHP. Point apache conf directory when it asks so and select the appropriate web server. Move the PHP.ini file to C:\WNDOWS directory

PHP Comments All php files are saved with extension.php The can be written in notepad or any text editor Single line comment // this is single line comment Multi line comment /*…. This is a multi line comment */

Sample PHP The above program will display hello in the browser

Variables Variables start with a $ symbol Variables can contain _ or numbers or alphabets $ should be followed by _ or alphabet and not by a number PHP is loosely typed language. There is no strict data typing Variable can be assigned with any values

Conditions If else if(condn) {….} elseif(condn) {….} else { ….} Switch case switch(var) { case c1: statements;break. Default: statements; break; }

Loops For for(intialisation;condition;increment/decrement) { statements } While while(condn) { ….} Do While do {….} while(condn);

Functions and Parameters PHP functions need to be defined with key word function It can have zero or more values (parameters) Functions may or may not return values If a function need to return value, the last statement of the function should be return return value;

Functions Parameter less function <?php function sayHi() { echo “hi”; } ?> This can be called as in the program

Functions Parameterized function <?php function greet($name) { echo “Hello “. $name; } ?> This can be called This gives an output Hello Ram

Functions Function returning value <?php function add($a,$b) { return ($a + $b); } ?> When called like we will get an output 3 in the browser.

File Handling This involves 5 tasks Opening a file Reading data from a file Displaying the read data Writing contents to another file Closing a file

Opening a file $fp = fopen(‘filename’,’mode’); Eg $fp = fopen(‘c:\abc.txt’,’r’); This opens a file abc.txt in read only mode Available modes: r – read only w – write only w+ - read write A – append – adding to the end

Reading a file Several methods are available fread(filepointer,no of bytes to read) fgetc(filepointer) – Reads character by character fgets(filepointer) – Reads line by line The read content can be stored in a variable $data = fread($fp,10) – this reads 10 characters from file pointed by file pointer $fp and stores in $data If we want to read characters till end, we need to use a loop with condition checking for End of File

Writing to file We can use echo $data, to print the contents read from the file to browser Or we can open another file in write mode and put the contents to that file using either of these methods fwrite(filepoiner,data); fputc(filepointer,char); - writes character by character fputs(filepointer,line); - writes line by line Eg - fwrite($fpw,$data);

Closing a file feof(fp) – Checks for end of file. Returns –1 if EOF is reached. Otherwise returns 0 To close a file use fclose(filepointer) method Eg. fclose($fp); This closes the file pointed by $fp.

Database Handling PHP can connect to MySQL MSSQL Access and other databases like oracle, postgre sql etc There are separate methods available for connecting to the databases

MySQL and MSSQL Connection mysql_connect(dbserver,userid,password) mssql_connect(dbserver,userid,password) These methods are used for connecting to MySQL and MSSQL server using a userid and password $con = mysql_connect(‘localhost’,’root’,’root’); This gets a connection to the local mysql server using the credentials root and root If server cannot be connected, it will throw an error stating the problem Note: Mysql and MSSQL can be accessed in identical way except for the preceeding mysql or mssql. So will use mysql henceforth.

MySQL Select DB mysql_select_db(connection,dbname) mysql_select_db($con,”test”); This will select the db test under the server localhost If unable to select the database, an error will be thrown

MySQL Execute Query mysql_query(connection,sql statement); This will execute the sql statement on the database and store the result in a variable Eg $rs = mysql_query($con,select stmt); The rows of select statement will be stored in $rs $row = mysql_fetch_array($rs); This will fetch a row and store in $row Values can be accessed like - $row[“ID”] – returns value of column ID in the fetched row.

MySQL and MSSQL Close To close a db connection we have close method mysql_close(connection); mssql_close(connection); Example mysql_close($con); mssql_close($con);

ODBC Data handling Connect to a data source odbc_connect(dsn,uname,pwd); DSN – Data Source Name Go to Control Panel -> Administrative Tools -> Datasources (ODBC) Click on ODBC and select System DSN tab. Click Add and choose Access Database (mdb) and click Finish In the dialog that appears, give DSN Name and Description

ODBC Data handling Contd.. Click on Select under Database section Choose a mdb (access database file) and give OK $conn=odbc_connect('nwind','',''); Here nwind is the DSN that we have created in our system to access a database We have not given any user name or password during DSN creation So those fields are left empty.

Selecting rows from a table $rs = odbc_exec($conn,$sql); $conn – connection string $sql – SQL query to select rows from table $rs is the result set of the query execution odbc_fetch_row($rs) This command fetches row by row from the result set $cid = odbc_result($rs,"CustomerID"); This command fetches value for the column CustomerID from the current row and stores it in the variable $cid.

Closing Connection odbc_close(connection) This function closes the connection obtained and releases the same to the connection pool odbc_close($conn); The connection defined by $conn is released and no query can be executed using this connection variable hence forth.