ExpertRating - Online Certification and Employment Testing ExpertRating - Online Certification and Employment Testing ExpertRating - Online Certification and Employment Testing

ExpertRating Home
ExpertRating Benefits
Recommend ExpertRating
Suggest More Tests
Privacy Policy
HTML Tutorial - Index
HTML Tutorial - Introduction
HTML Tutorial - Formatting
HTML Tutorial - Links
HTML Tutorial - Images
HTML Tutorial - Forms
HTML Tutorial - Tables
HTML Tutorial - Frames
HTML Tutorial - Style Sheets
HTML Tutorial - Advance Tags

Online Personal Trainer Certification
Personal Trainer Certification (Spanish)
Six Sigma Certification
Find a Personal Trainer
Project Management Certification
Six Sigma Certification
Six Sigma Black Belt Certification
Master Black Belt Certification
Six Sigma Green Belt Certification
Life Coach Certification
Lean Management Certification
Lean Six Sigma Certification
First Aid Certification
CPR Certification
Yoga Certification
Aerobics Certification
Pilates Certification
Business Analyst Certification
SEO Certification
Online Business Writing Course & Certification
Makeup Artist Certification
Baby Sitting Course & Certification
Time Management Certification
Health Club Management Certification
Medical Coding Certification
Medical Billing Certification
Business Analysis Course
Master Trainer Certification
Total Quality Management Certification
Kaizen Certification
Creative Writing Certification
Event Management Certification
Test Search by Job Title
Administrative Assistant Certification
Virtual Assistant Certification
  All Online Courses


  Home > Courses, Tutorials & eBooks > HTML Tutorial > Style Sheets
Previous Next

HTML Tutorial - Style Sheets

                                                                                                                       Page 3 of 4

Div Tag

The div tag defines a division or section in a document. It makes a logical division in a document. The function of the div tag does is that it leaves a white space before and after the div tag. In this way logical divisions can be made.



<div style=”color:#FF0000;”>

<h3> This is a header in this div section </h3>



<div style=”color:#CCCC99;”>

<p> This is a paragraph in another div section </p>



Span Tag

The span tag groups inline elements and formats them with styles in a document.

For example, if some lines in a paragraph have to be formatted differently than the rest of the lines, then, the span tag is used. Those lines whose format is to be changed are put between the span tags and the span tags are contained in the paragraph tags. The span tag can be used between any set of tags.



<p> This is the first line in a paragraph.

<span style=”color:#FFCC99;”> This is the second line in the paragraph. </span>

This is third line in the paragraph. </p>


Introduction to JAVASCRIPT

 Today's web sites are very interactive. Web Browsers allow users to interact with such web sites. HTML in itself allows minimal interaction with users. Truly interactive pages cannot be created using standard HTML 'tags' alone. Embedding JavaScript in an HTML document makes this possible.

JavaScript is an easy-to-use scripting language that can work with HTML. These scripts make the web site dynamic in nature. The web pages created by using JavaScript can accept input from the user, show pop-up windows, create cookies etc.

In the example stated below, an alert box will pop up when the web page is loaded. In this, a simple function called message is created, and this function is triggered with the onload event (More can be read about JavaScript in the JavaScript tutorial).





<script type="text/javascript">

Function message()


Alert("This alert box will be called when the page is loaded")





<body onload="message()">





Script Tag

The script tag is used to define a script, such as JavaScript. This tag is used in the example shown above. In this, the type of the script has to be given with it.

In the following example, “How are you?” will be printed in the browser but with the use of JavaScript.



<script type=”javascript”>

Document.write(“How are you?”)



Noscript Tag

The noscript tag is used to display some alternate content if the browser does not execute the script. This tag is used for the browsers who do not support scripting.



<script type=”javascript”>

Document.write(“How are you?”)



<noscript> Your browser does not support scripting. </noscript>



Applet Tag

The applet tag defines an embedded applet. An applet is a small application program. This tag is used to include applets in a web page. Applets are not written in HTML. They are separate programs written in Java language.

Attributes of Applets


Code gives the file name of the applet to run.



<applet code= “myapplet.class” >




Codebase indicates the path to the directory of applet class. It indicates how to find the class file when it is not in the same directory as the web page.



<applet code=”myapplet.class” codebase=”../applets” >




Width indicates how wide the applet should be.



<applet code=”myapplet.class” codebase=”../applets” width=100>




Height indicates how tall the applet should be.



<applet code=”myapplet.class” codebase=”../applets” width=100 height=50>





Home  |  About Us  |  Privacy Policy  |  Site Map  |  FAQs  |  Contact Us
© ExpertRating 2015. All Rights Reserved.