0% found this document useful (0 votes)
41 views14 pages

Client Side Languages

The document discusses the differences between client-side and server-side programming, web pages, URLs, and web servers. Client-side programming includes JavaScript and runs on the user's computer after page load, while server-side programming includes PHP and runs scripts before page load on the hosting server. URLs provide a unique address for web resources and are used to access web pages stored on web servers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views14 pages

Client Side Languages

The document discusses the differences between client-side and server-side programming, web pages, URLs, and web servers. Client-side programming includes JavaScript and runs on the user's computer after page load, while server-side programming includes PHP and runs scripts before page load on the hosting server. URLs provide a unique address for web resources and are used to access web pages stored on web servers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

1- What is the difference between server side and client side programming?

Client Side Languages

 Client side development is done almost in JavaScript. This is in addition to


basic HTML and CSS code.
 The reason JavaScript is called a client side language is because it runs scripts
on your computer after you’ve loaded a web page.

Server Side Languages

 A server side runs its scripts before the HTML is loaded, not after.
 There are a range of server side languages in use on the web today.
 PHP is one of the most popular, as well as ASP.NET and many others.
 They are called server side languages because their scripts are run not on your
computer, but on the server which hosts the website and sends down the
HTML code.
2- What is the relation between web pages, web servers, and URL?

URL:

 Uniform Resource Locator


 It is the global address of documents and other resources on the World Wide
Web
 Each page on the internet have unique URL

Web Page

 The site files are what your visitors and customers actually see when going to
site such as your products and services

Web Servers

 The web-hosting or server is much like the space that you rent out to have
your business in
 You can Access Web page on Web Server using URL

3- What is the function of the following tags?

1. <Style>

Defines style (CSS) information for a document

2. <Meta>

Defines metadata about an HTML document

3. <Script>
Defines a client-side Java script statements

4. <Link>

Defines the relationship between a document and an external resource (most


used to link to style sheets)

5. <base>

Specifies the base URL/target for all relative URLs in a document

4- State the advantages of CSS

CSS Saves a Lot of Work.


Style definitions are normally saved in external .css files.
You can change the look of an entire Web site by changing just one file.
All browsers support css today

5- How can CSS be provided with HTML ?


Inline - using a style attribute in HTML elements
Internal - using a <style> element in the HTML <head> section
External - using one or more external CSS files by <link> tag

6- Complete:

1. HTML stands for Hyper Text Markup Language


2. URL stands for Uniform Resource Locator

3. HTML documents contain header and body


4. HTML is a Markup language
5. A markup language is a set of Tags
6. HTML documents are also called web document or web page
7. Attributes provide additional information about HTML elements
8. HTML tags are not case sensitive
9. Attributes come in name/value pairs
10. The <hr/> tag creates a horizontal line in an HTML page
11. The <b> tag defines bold text
12. The <address> tag defines contact information for the author/owner of a
document
13. The value of the src attribute is the URL of the image you want to display
14. Elements inside <head> can include scripts, instruct the browser where to find
style sheets, provide meta information and more
15. The following tags can be added to the head section title, meta-data, scripts and
CSS style.
16. If the name of a font family is more than one word, it must be in quotations
marks
17. The default text size in browsers is 16px OR 1em
18. The default size of 1em is 16px
19. The size can be calculated from pixels to em using the formula pixels/16=em
20. By using @media rule, a web site can have a different layout for screen, print,
mobile phone, tablet, etc ..

7- State the functions of the <title> element?


 defines a title in the browser toolbar
 provides a title for the page when it is added to favorites
 displays a title for the page in search-engine results

8- Describe how to create a file upload field that accepts multiple values?

<form action=" " >


<input type="text" name="textline" size="30">
</form>

9- State the different way for defining color in CSS?


Background-color
Color

10- State the different types of selectors in CSS?

Element Selector
Id Selector
class Selector
Grouping Selectors
Child Selector
Adjacent Sibling Selector
General Sibling Selector

11- What is the difference:


1. HTML and XHTML
3. Variable declaration in php and other languages such as JAVA
 In JAVA -> Var variable_name with no data type
IN PHP -> $ variable_name with no data type

 The Most Important Differences from HTML:


 Document Structure
o XHTML DOCTYPE is mandatory
o The xmlns attribute in <html> is mandatory
o <html>, <head>, <title>, and <body> are mandatory

 XHTML Elements
o XHTML elements must always be closed
o XHTML elements must be in lowercase
 XHTML Attributes
o Attribute names must be in lower case
o Attribute values must be quoted
Attribute minimization is forbidden

4. Echo and Print

o echo  has no return value , can output one or more strings


o print  has a return value of 1 ,can output only one string

12- State the different types of variable scopes in PHP?

Global
Local
Static

13- What is meant by:


1. var_dump()
function returns the data type and value
2. global keyword
used to access a global variable from within a function

14- Given X=2, Y=3, a=1, b=4, write PHP code to compute solve computer the following:
1. Z = 2X + 5Y

2. Z = X/a - Y/b

15- Write PHP command to find the position of the word "University" in "Mansoura University"?

$pos = strpos("Mansoura University ", " University");

16- Identify true or false?


1. URL has to converted into valid ASCII format (True)
2. URL encoding converts characters into format that can be transmitted over the
internet (True)
3. URL encoding replaces non ASCII characters with a "%" followed by two
hexadecimal digits (False => unsafe ASCII)
4. URLs cannot contain spaces (True)
5. URL encoding normally replaces a space with a + sign (True)
6. URL is used to address a document (or other data) on the world wide web (True)
7. URLs can only be sent over the internet using ASCII character-set (True)
8. URL encoding converts characters into a format that can be transmitted over the
internet (True)
9. An inline style can be used if a unique style is to be applied to one single occurrence
of an element (True)

10. Internal styles are defined in the <head> section of an HTM page, by using the
<style> tag (True)
11. Print and echo can be used with or without parentheses (False => echo only)
12. PHP variables can be used to hold values or expressions (False => Java Script)

17- State the different types of:


a- Styles
Inline Styling (Inline CSS)
Internal Styling (Internal CSS)
External Styling (External CSS)
b- Selectors

18- Write CSS+HTML code to print the following

19- T or F and correct false


a- a:hover must come after a:active (false)
b- the internal style cannot be used if aunique style is to be applied to one
single occurrence of an elements (true)
c- fixed position elements can overlap other elements (true)
d- PHP is client side technology (false)
e- PHP statements should not terminated terminated by semicolon (false)
f- In PHP,variables are case sensitive (true)
g- Echo is faster compared to print as echo return a value of one (false)
h- PHP has no command for declaring a variables (true )

20- In CSS, describe how to calculate the total width of an element

Total element width = width + left padding + right padding + left border +
right border + left margin + right margin

21- What is the difference between


a- HTML and XHTML
b- Display:none and visibility:hidden
c- Fixed and static positioning

visibility: hidden
 Hides an element, but it will still take up the same space as before.
The element will be hidden, but still affect the layout
display: none
 Hides an element, and it will not take up any space.
The element will be hidden, and the page will be displayed as if the element is not
there

Static Positioning Fixed Positioning

 Element is always positioned according to the  Element is positioned relative to the


normal flow of the page. browser window, and will not move
 Elements are not affected by the top, bottom, even if the window is scrolled.
left, and right properties.  Fixed positioned elements are removed
from the normal flow.
 Fixed positioned elements can overlap
other elements.

22- Design a box that has


a- 250 pixels width and 300 pixels length
b- Red background
c- Solid line border with radius 25 pixel
d- Padding of 50 x 50 pixel
e- 15 x 15 x 30 shadow box

f- For the above box write jquery code to perform animation to this box such
animation must include changing its height, width and transparency in 3
seconds.

23- Describe how to display the following information in a web page?


24- Write the tag which defines the following:.
a- Text direction <bdo>
b- Computer code text <code>
c- Superscript characters <sup>

25- State the different way for defining color in CSS?


Hexadecimal value  #FF1247
Color value  "red"
RGB value  rgb(120,255,147)

26- What are the most important css3 modules?


Some of the most important CSS3 modules are:
a. Selectors
b. Box Model
c. Backgrounds and Borders
d. Image Values and Replaced Content
e. Text Effects
f. 2D/3D Transformations
g. Animations
h. Multiple Column Layout
i. User Interface

27- Write a statement that perform the following:


a- Rotate a box with angle of 25
transform: rotate(25 deg);

b- Move a box 50 pixel to right and 100 pixel down


transform: translate(50px, 100px);
c- Create 4 columns with a gab of 30 pixels
column-count: 4;
column-gap: 30px;

d- Read a file and write it to the output buffer

e- Read from an open file

28- Write php code to :


a- Arrange the following courses (web prog,math,computer graphics) in
descending alphabetical order and then count these courses
b- Solve the following

X2-2x+1=0
a.

b.
29- How can HTML source code of a web page be viewed?
web page Press CTRL + U on you computer's keyboard.
Or press F12 .
Or right click on the mouse and select view page source

30- what is the purpose of web browser?


The purpose of a web browser is to read HTML documents and display them.
The browser does not display the HTML tags, but uses them to determine how
to display the document
Browser remove any extra spaces and lines when page is displayed.

31- Describe how to:


a. Make a link to an email address
b. Invoke the image http:www.cis.mans.edu.eg/images/logo.jpg which
is 50x75 pixel from www.cis.mans.edu
c. Make the image s1.jpg which is 40x40 pixels a link for cnn.com

32- Give example for:


a. Nested HTML elements
b. Writing a comment in HTML

a.
b. <!—this is comment -->
33- What is the function of the following tags?
a. <style>
b. <script>
c. <link>
d. <base>
34- Explain how to convert an HTML file to XHTML?

 Add an XHTML <!DOCTYPE> to the first line of every page


 Add an xmlns attribute to the html element of every page
 Change all element names to lowercase
 Close all empty elements
 Change all attribute names to lowercase
Quote all attribute values

35- What is the difference between:


a. block elements and inline elements
b. <title> and <head>
c. <hr> and <br>
d. <code and <meta>
e. <script> and <sup>

 Block elements normally start (and end) with a new line, when displayed in a browser.
 Inline elements are normally displayed without line breaks.
<hr> Define a horizontal line
<br> Empty element – line break
<meta> Define information about the HTML document.
<code> Define computer code text
<script> Define a client-side script such as JavaScript
<Sup> Define Supersript text

36- Write HTML+CSS code o print the following:


Firstname Lastname Points
Ahmed Hamed 65
Gamal Saad 86
Mohammed Kamal 77
37- How to display the following information in a web page?

 Data structure
 Web design
o Server side
 PHP
 JAVA
o Client side
 Linear algebra

38- Write the tag in which defines the following:


a. Text direction
b. Computer code text
c. Superscript character

39- State the different ways for defining a color in CSS?


Hexadecimal, RGB, color name

40- Clarify the purpose of the following functions:


a. FadeIn()  used to fade in a hidden element.
b. FadeToggle()  toggles between the fadeIn() and fadeOut() methods
c. SlideDown()  slide down an element.
d. SlideToggle()  toggles between the slideDown() and slideUp() methods

41- What is the output of the following code?

Float(23.79), 21, 7

You might also like