Download Understanding the Interplay between HTML, CSS, JavaScript, and PHP in Web Development and more Study notes Web Design and Development in PDF only on Docsity!
Web Design and
Development
- You enter http://server.com into your browser’s address bar.
- Your browser looks up the IP address for server.com.
- Your browser issues a request to that address for the web server’s home page.
- The request crosses the Internet and arrives at the server.com web server.
- The web server, having received the request, fetches the home page from its hard disk.
- With the home page now in memory, the web server notices that it is a file incorporating PHP scripting and passes the page to the PHP interpreter.
- The PHP interpreter executes the PHP code.
- Some of the PHP contains MySQL statements, which the PHP interpreter now passes to the MySQL database engine.
- The MySQL database returns the results of the statements back to the PHP interpreter.
Q1. What four components are needed to create a fully dynamic web page? Ans. 1. A web server (such as Apache),
- a server-side scripting language (PHP),
- a database (MySQL),
- and a client-side scripting language (JavaScript).
php
- PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages.
Comments // single line comment /* this is a multi line comment */ Variable declaration
- Php is a loosly typed language.
- We place a $ in front of a variable when declaring it.
- $a=10;
- $mycounter=1;
- $mystring = “hello”;
- $myarray = array(“one”, “two”, “three”);
What is HTML?
- HTML stands for Hyper Text Markup Language
- HTML is the standard markup language for creating Web pages
- HTML describes the structure of a Web page
- HTML consists of a series of elements
- HTML elements tell the browser how to display the content
- HTML creates static web pages
- HTML is not Case sensitive.
What is an HTML Element?
- An HTML element is defined by a start tag, some content, and an end tag: Content goes here...
HTML tags
- Heading tag
- We define the tag from through
- defines the most important heading and defines the least imp heading.
- HTML paragraphs
- They are defined with the
tag.
- line break
### HTML Attributes
- All HTML elements can have attributes
- Attributes provide additional information about elements
- Attributes are always specified in the start tag
- Attributes usually come in name/value pairs like: name="value"
The href Attribute
- The tag defines a hyperlink. The href attribute specifies the URL of the page the link goes to: Click here a-> anchor tag.
width and height Attributes
The tag should also contain the width and height attributes, which specifies the width and height of the image (in pixels):
alt Attribute
The required alt attribute for the tag specifies an alternate text for an image, if the image for some reason cannot be displayed. This can be due to slow connection, or an error in the src attribute, or if the user uses a screen reader. Example:-