• No results found

Short notes on webpage programming languages

N/A
N/A
Protected

Academic year: 2021

Share "Short notes on webpage programming languages"

Copied!
5
0
0

Loading.... (view fulltext now)

Full text

(1)

Short  notes  on  webpage  programming  languages

   

What is HTML?

HTML is a language for describing web pages.

HTML  stands  for  Hyper  Text  Markup  Language  

HTML  is  a  markup  language  

A  markup  language  is  a  set  of  markup  tags  

The  tags  describe  document  content    

HTML  documents  contain  HTML  tags  and  plain  text  

HTML  documents  are  also  called  web  pages  

HTML Tags

HTML markup tags are usually called HTML tags

HTML  tags  are  keywords  (tag  names)  surrounded  by  angle  brackets  like  

<html>  

HTML  tags  normally  come  in  pairs  like  <b>  and  </b>  

The  first  tag  in  a  pair  is  the  start  tag,  the  second  tag  is  the  end  tag  

The  end  tag  is  written  like  the  start  tag,  with  a  forward  slash  before  the   tag  name    

Start  and  end  tags  are  also  called  opening  tags  and  closing  tags   Syntax  for  a  basic  html  page:

<!DOCTYPE  html>  

<html>  

<body>  

<h1>My  name  is  …..</h1>  

<p>My  first  paragraph</p>  

</body>  

</html>  

Example Explained

The DOCTYPE declaration defines the document type

The text between <html> and </html> describes the web page

The text between <body> and </body> is the visible page content

The text between <h1> and </h1> is displayed as a heading

The text between <p> and </p> is displayed as a paragraph

HTML Hyperlinks (Links)

• The  HTML  <a>  tag  defines  a  hyperlink.  

• A  hyperlink  (or  link)  is  a  word,  group  of  words,  or  image  that  you  can   click  on  to  jump  to  another  document.  

• When  you  move  the  cursor  over  a  link  in  a  Web  page,  the  arrow  will  turn   into  a  little  hand.  

(2)

• The  most  important  attribute  of  the  <a>  element  is  the  ‘href’  attribute,   which  indicates  the  link's  destination.  

By default, links will appear as follows in all browsers:

An  unvisited  link  is  underlined  and  blue  

A  visited  link  is  underlined  and  purple  

An  active  link  is  underlined  and  red  

 

HTML Link Syntax

The HTML code for a link is simple. It looks like this:

• <a  href="url">Link  text</a>    

The href attribute specifies the destination of a link.

Example:  

<a  href="http://www.w3schools.com/">Visit  W3Schools</a>    

   

HTML Images - The <img> Tag and the Src Attribute

In HTML, images are defined with the <img> tag.

The <img> tag is empty, which means that it contains attributes only, and has no closing tag.

To display an image on a page, you need to use the src attribute. Src stands for "source".

The value of the src attribute is the URL of the image you want to display.

Syntax for defining an image:

• <img  src="url"  alt="some_text">  

Example:  

<img  src="smiley.gif"  alt="Smiley  face    

What is CSS?

CSS  stands  for  Cascading  Style  Sheets  

Styles  define  how  to  display  HTML  elements  

Styles  were  added  to  HTML  4.0  to  solve  a  problem  

External  Style  Sheets  can  save  a  lot  of  work  

External  Style  Sheets  are  stored  in  CSS  files  

JavaScript is a Scripting Language

• A  scripting  language  is  a  lightweight  programming  language.  

• JavaScript  is  programming  code  that  can  be  inserted  into  HTML  pages.  

(3)

 

What is XML

XML stands for eXtensible Markup Language.

XML is designed to transport and store data.

XML is important to know, and very easy to learn

Classic ASP - Active Server Pages

• Active  Server  Pages  (ASP),  also  known  as  Classic  ASP,  was  introduced  in   1998  as  Microsoft's  first  server  side  scripting  engine.    

• ASP  is  a  technology  that  enables  scripts  in  web  pages  to  be  executed  by  an   Internet  server.  

• ASP  pages  have  the  file  extension  .asp,  and  are  normally  written  in   VBScript.  

• If  you  want  to  learn  Classic  ASP    

ASP.NET

• ASP.NET  is  a  new  ASP  generation.  It  is  not  compatible  with  Classic  ASP,   but  ASP.NET  may  include  Classic  ASP.  

• ASP.NET  pages  are  compiled,  which  makes  them  faster  than  Classic  ASP.  

• ASP.NET  has  better  language  support,  a  large  set  of  user  controls,  XML-­‐

based  components,  and  integrated  user  authentication.  

• ASP.NET  pages  have  the  extension  .aspx,  and  are  normally  written  in  VB   (Visual  Basic)  or  C#  (C  sharp).  

• User  controls  in  ASP.NET  can  be  written  in  different  languages,  including   C++  and  Java.  

When a browser requests an ASP.NET file, the ASP.NET engine reads the file, compiles and executes the scripts in the file, and returns the result to the browser as plain HTML.

What is PHP?

PHP  is  an  acronym  for  "PHP  Hypertext  Preprocessor"  

PHP  is  a  widely-­‐used,  open  source  scripting  language  

PHP  scripts  are  executed  on  the  server  

PHP  costs  nothing,  it  is  free  to  download  and  use  

What is a PHP File?

PHP  files  can  contain  text,  HTML,  CSS,  JavaScript,  and  PHP  code  

PHP  code  are  executed  on  the  server,  and  the  result  is  returned  to  the   browser  as  plain  HTML  

PHP  files  have  extension  ".php"  

(4)

What Can PHP Do?

PHP  can  generate  dynamic  page  content  

PHP  can  create,  open,  read,  write,  and  close  files  on  the  server  

PHP  can  collect  form  data  

PHP  can  send  and  receive  cookies  

PHP  can  add,  delete,  modify  data  in  your  database  

PHP  can  restrict  users  to  access  some  pages  on  your  website  

PHP  can  encrypt  data  

With PHP you are not limited to output HTML. You can output images, PDF files, and even Flash movies. You can also output any text, such as XHTML and XML.

Why PHP?

PHP  runs  on  various  platforms  (Windows,  Linux,  Unix,  Mac  OS  X,  etc.)  

PHP  is  compatible  with  almost  all  servers  used  today  (Apache,  IIS,  etc.)  

PHP  supports  a  wide  range  of  databases  

PHP  is  free.  Download  it  from  the  official  PHP  resource:  www.php.net  

PHP  is  easy  to  learn  and  runs  efficiently  on  the  server  side  

What is SQL?

SQL  stands  for  Structured  Query  Language  

SQL  lets  you  access  and  manipulate  databases  

SQL  is  an  ANSI  (American  National  Standards  Institute)  standard  

What Can SQL do?

SQL  can  execute  queries  against  a  database  

SQL  can  retrieve  data  from  a  database  

SQL  can  insert  records  in  a  database  

SQL  can  update  records  in  a  database  

SQL  can  delete  records  from  a  database  

SQL  can  create  new  databases  

SQL  can  create  new  tables  in  a  database  

SQL  can  create  stored  procedures  in  a  database  

SQL  can  create  views  in  a  database  

SQL  can  set  permissions  on  tables,  procedures,  and  views  

SQL is a Standard - BUT....

(5)

However, to be compliant with the ANSI standard, they all support at least the major commands (such as SELECT, UPDATE, DELETE, INSERT, WHERE) in a similar manner.

Note:  Most  of  the  SQL  database  programs  also  have  their  own  proprietary   extensions  in  addition  to  the  SQL  standard!

Using SQL in Your Web Site

To build a web site that shows data from a database, you will need:

An  RDBMS  database  program  (i.e.  MS  Access,  SQL  Server,  MySQL)  

To  use  a  server-­‐side  scripting  language,  like  PHP  or  ASP  

To  use  SQL  to  get  the  data  you  want  

To  use  HTML  /  CSS  

RDBMS

• RDBMS  stands  for  Relational  Database  Management  System.  

• RDBMS  is  the  basis  for  SQL,  and  for  all  modern  database  systems  such  as   MS  SQL  Server,  IBM  DB2,  Oracle,  MySQL,  and  Microsoft  Access.  

• The  data  in  RDBMS  is  stored  in  database  objects  called  tables.  

• A  table  is  a  collection  of  related  data  entries  and  it  consists  of  columns   and  rows.  

   

References

Related documents

Create all these analytical services, where clause with easy explanation for post method of range of spring data jpa can inject any mysql java insert update delete example will

9(a)-(d) which plots wall-clock time as a function of model simulation time for runs of NUMA2D-DG that employ both unpreconditioned GMRES (red circles) and GMRES preconditioned with a

Depending on the exact nature of the apocalypse, survivors may have to contend with the side effects of ecological disaster or the lingering effects of nuclear, chemical,

Questions of this type have lead economists to develop revealed preference theory which addresses consistency of consumer behavior that is independent of the utility function value

2008, the problems that consider the cross-dock facility as a node within larger transportation network include: (i) the routing of vehicles from/to the cross

Abstract Background/Purpose: To measure the inflammatory response in terms of tumor ne- crosis factor-alpha (TNF- a) levels in cerebrospinal fluid (CSF), using bacteriolytic versus

allows RINA Prime Value Services to provide a specialised, professional range of solutions for either Building, Asset, Facility, Property, or Energy Management. ASSET