WhileNetworking

  • Home
  • CCNA
  • Cisco Packet Tracer Download
    • Cisco packet tracer 6.3
    • cisco packet tracer 6.2
    • Cisco Packet Tracer 7
  • Linux Server Management
  • About Us
  • Privacy Policy
  • Contact Us

Basic of Web Scripting

You are most welcome to this post.
Web Scripting
Really thanks to you for your interest in this topics. :)

To see the HTML source code of a web page (for example, from Internet Explorer), click View > Source. The following is an example of a simple HTML document:

<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>

<h1>My First Heading</h1>
<p>My first paragraph.</p>

</body>
</html>

A markup language is a set of markup tags. HTML documents are described by the HTML tags.

HTML documents must start with the <!DOCTYPE html> document type declaration. The HTML document itself begins with the <html> tag and ends with the </html> tag. The visible part of the HTML document is between the <body> tag and the </body> tag.

CSS is a style sheet language that can be used to describe the style of an HTML document or how the HTML elements should be displayed. For example as shown below, the code background-color: lightblue; is used to display a light blue background color on the web page:

<!DOCTYPE html>
<html>
<head>
<style>
body {
    background-color: lightblue;
}
</style>
</head>
<body>

<h1>Hello Cisco!</h1>

<p>This page has a light blue background color!</p>

</body>
</html>

CSS can also be used to indicate the text alignment, font size, and so on.

Server-Side and Client-Side Scripting

Web scripting is used to create dynamic content on a web page in addition to the static content. There are two approaches to implement the web scriptings:

  • Server-side scripting is used in web applications development which involves using scripts on a web server to produce a response that is customized for each user’s request to the website. The scripts may be written in any programming language, such as PERL, Python, PHP, and so on.
  • Client-side scripting uses a language that is designed for the script to be executed by the client’s web browser. Examples of client-side scripting languages include JavaScript, Visual Basic Script, and so on.

A common way to implement a JavaScript is to define the JavaScript in a separate file, then link to the JavaScript file using the src attribute of the script tag. In the example that is shown below, the scriptname.js file contains the JavaScript. The JavaScript is embedded in a web page using the <script type="text/javascript"> and </script> tags.

<!DOCTYPE html>
<html>
<body>
<script type="text/javascript" src="scriptname.js"></script>
</body>
</html>

Instead of specifying the JavaScript file with the src attribute, the actual JavaScript can be written between the <script type="text/javascript"> and </script> tags, as shown below:

<script type="text/javascript">
document.write('Hello Cisco')
</script>

The above JavaScript will render the “Hello Cisco” output on the client’s web browser.

The <script> tag can also be used to tag the JavaScript instead of <script type="text/javascript"> as shown below. The <script type="text/javascript"> tag is required in HTML 4, but optional in HTML 5. In HTML 5, the script type defaults to text/javascript.

<script>
document.write('Hello HTML 5')
</script>
Jul 14, 2018Himadri
 

Share with friends :

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Tumblr (Opens in new window)
  • Click to share on Pinterest (Opens in new window)
  • Click to share on WhatsApp (Opens in new window)
  • Click to email a link to a friend (Opens in new window)
  • Click to share on Pocket (Opens in new window)
  • Click to share on Telegram (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • Click to print (Opens in new window)

Related

HTTPS working principleSQL working principle

Leave a Reply Cancel reply

14 + 5 =

Himadri

Hi, I'm Himadri. I love blogging with tech topics, specially computer networking. We'll have more fun in the upcoming day. Stay with me. :)

July 14, 2018 Cyber Security123
Feel Free to Share :)
0
GooglePlus
0
Facebook
0
Twitter
0
Digg
0
Delicious
0
Stumbleupon
0
Linkedin
0
Pinterest
Find Us on Facebook
Choose a category !!
  • CCNA
  • Cisco Certification Exam
  • cisco packet tracer 6.2
  • Cisco packet tracer 6.3
  • Cisco Packet Tracer 7
  • Cisco Packet Tracer 7.1
  • Cisco Packet Tracer 7.2.1
  • Cisco Packet Tracer 7.3
  • Cyber Security
  • Engineering Ebooks
  • Excel
  • IELTS Ebook
  • Internet
  • Know computer
  • Know your computer
  • Laser Processing of Material
  • Linux installation and server management
  • PDF
  • Technology
  • Uncategorized
Top posts
  • Free download Principles of Electronics by VK Mehta
  • How to change Cisco packet tracer default language?
  • The Diffie-Hellman (DH) algorithm
Archieves
Get latest updates by Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 19 other subscribers
W
SC
wordpress counter
Analytics
Recent Comments
    Browse by categories
    Cyber SecurityLinux installation and server managementCCNAKnow your computerKnow computerCisco Packet Tracer 7UncategorizedCisco Certification ExamInternetPDFCisco Packet Tracer 7.3Engineering EbooksCisco packet tracer 6.3cisco packet tracer 6.2Cisco Packet Tracer 7.1TechnologyExcelLaser Processing of MaterialCisco Packet Tracer 7.2.1IELTS Ebook
    Feel free to contact with us

    Hi, any kind of comment or suggestion is valuable to us. So feel free to contact with us.

    Email: himadri.shekhar.bd@gmail.com

    Name: WhileNetworking.com

    2021 © WhileNetworking