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
FAQ
Login
 
CSS Tutorial - Index
CSS Tutorial - Introduction to CSS
CSS Tutorial - Basic CSS Concepts
CSS Tutorial - Linking Style Sheets
CSS Tutorial - Text Formatting
CSS Tutorial - Backgrounds
CSS Tutorial - Fonts
CSS Tutorial - Borders
CSS Tutorial - Margins and Padding
CSS Tutorial - Lists
CSS Tutorial - Dimensions
CSS Tutorial - Display and Positioning
CSS Tutorial - Pseudo Classes and Elements
CSS Tutorial - W3 Standards,Validation of Style
     

 
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 > CSS Tutorial > Linking Style Sheets
 

CSS Tutorial - Linking Style Sheets

                                                                                                                 Page 2 of 2
 

SPAN and DIV Tags

All HTML tags, except for SPAN and DIV tags, apply meaning to the content they are applied on . Yet they are used extensively in conjunction with CSS. SPAN and DIV tags are used to group a portion of the HTML code and add some information on to that part. 

There are some basic differences between SPAN and DIV tags.    

SPAN tag is used to group inline elements to format them with styles and is usually used for a small portion of code. It affects the style of the text it encloses. Inline elements include tags like A (Anchor), B (Bold), BR (Break), Small, Strike, U (Underline) etc.

  • Text can be highlighted using SPAN tag.

  • Color can be added to the text.

  • Background image can be set for a text.

  • There is no closing tag for SPAN.

DIV element is Block line and is used to group larger portions of code. Div tag defines logical divisions within the document. Whenever a <div> tag is encountered, it means the content enclosed in it is a specific section of the page. Block level element include tags like Address, Center, DIR (Directory list), HR (Horizontal Rule), H1, H2, H3, H4, H5, H6.

 
Summary
 

In this chapter you have learnt:

  • The different methods of linking style sheets to your document
  • Locating style sheets at different places
  • Grouping various HTML elements through Span and Div tags
 
Review Questions
 

Fill in the Blanks

  1. _____ style sheets are also known as embedded style sheets.
  2. Style sheets are defined using _____ tag.
  3. _____ style sheets allow you to follow the same style in more than one web page.
  4. Pages are linked to the style sheet using _____ tag.
Solutions
  1. Internal
  2. Style
  3. External
  4. Link

State whether True or False

  1. Inline style sheet is applicable on more than one web page.
  2. Embedded style sheet is defined in the head section.
  3. Span tag is used to group various inline HTML elements.
  4. Text can be highlighted using span tag.

Solutions

  1. False
  2. True
  3. True
  4. True
Exercise
Create an external style sheet and link it with 2 different pages.
Solution
View code             
View Runtime (First Page)
            
View Runtime (Second Page)

Question

Which style sheet, among inline, external and embedded, is first recognized by the browser?

Solution

The browser first tries to apply an external style sheet, then an embedded and finally the style information that appears inline.

 
 
What's Next

The next chapter will acquaint you with the concepts of text formatting applicable on your web page. It will also tell you about different style options along with their various properties and possible values.

                         Hop over to the next chapter to get a close-up of various style sheets.

 

 

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