Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

CSS Exercises: Understanding CSS Properties, Exercises of Programming Languages

Answers to short and long answer questions related to css properties, including explanations of inline styling, text properties, font styles, border and margin properties, and specific property names. It also includes examples and definitions of key terms.

What you will learn

  • What is inline styling and how is it used?
  • What are five CSS text properties and what do they do?
  • What is the syntax rule for using CSS?
  • What is CSS and what is it used for?
  • What is the difference between word-spacing and letter-spacing?

Typology: Exercises

2021/2022

Uploaded on 02/11/2022

maya090
maya090 🇺🇸

4.3

(23)

287 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CHAPTER 5
MORE ON HTML CSS
EXERCISES
Q1.SHORT ANSWER QUESTIONS
1. What is CSS?
Ans: CSS stands for Cascading Style Sheets.It is used to style the web pages.It helps to make
HTML document more stylish and presentable.
2. What is word and letter spacing?
Ans: The word and letter spacing are the text properties of an element.
Word spacing : is used to add or subtract spaces between the words of a sentence.
Letter-spacing: is used to add or subtract spaces between the letters that make up a word.
3. What is Background image position?
Ans: Background position is the background properties which is used to set the position of the
background image of an HTML element.
4. what is Text indent?
Ans: Text-indent is the CSS text propetries used to indent the text of a paragraph.
5. Write down the syntax rule for using CSS?
Ans: The Syntax rule of CSS Style is:
Selector Declaration Declaration
H1 {Property : value ; Property : Value}
The selector points to the HTML element to style.
The declaration block contains one or more declarations separated by semicolon
Eacg declaration includes a CSS property name and Value, separate by a colon
It ends with a semicolon, and declaration blocks are surrounded by the curly braces.
Q2. LONG ANSWER QUESTIONS:
pf3

Partial preview of the text

Download CSS Exercises: Understanding CSS Properties and more Exercises Programming Languages in PDF only on Docsity!

CHAPTER – 5

MORE ON HTML CSS

EXERCISES

Q1.SHORT ANSWER QUESTIONS

  1. What is CSS?

Ans: CSS stands for Cascading Style Sheets.It is used to style the web pages.It helps to make HTML document more stylish and presentable.

  1. What is word and letter spacing?

Ans: The word and letter spacing are the text properties of an element.

Word – spacing : is used to add or subtract spaces between the words of a sentence.

Letter-spacing: is used to add or subtract spaces between the letters that make up a word.

  1. What is Background image position?

Ans: Background – position is the background properties which is used to set the position of the background image of an HTML element.

  1. what is Text – indent?

Ans: Text-indent is the CSS text propetries used to indent the text of a paragraph.

  1. Write down the syntax rule for using CSS?

Ans: The Syntax rule of CSS Style is:

Selector Declaration Declaration

H1 {Property : value ; Property : Value}

 The selector points to the HTML element to style.  The declaration block contains one or more declarations separated by semicolon  Eacg declaration includes a CSS property name and Value, separate by a colon  It ends with a semicolon, and declaration blocks are surrounded by the curly braces.

Q2. LONG ANSWER QUESTIONS:

  1. Explain Inline Styling with an example?

Ans: Inline styling allows to use multiple properties in one style tag.When CSS is written using Style attribute inside a tag is called “ inline style”

Example : code for Inline style attribute

sample code for inline style

Welcome to the CSS HTML code using Inline style

  1. Explain any five CSS Text properties?

Ans: CSS text properties helps in styling the text.

  1. Word – spacing : is used to add or subtract spaces between the words of a sentence.
  2. Letter-spacing: is used to add or subtract spaces between the letters that make up a word.
  3. Text-indent: is used to indent the text of a paragraph.
  4. Colour – is used to set the colour of the text.
  5. Text – align: is used to align the text of a paragraph, it can be center, left or right.
  6. Explain any five CSS font styles properties?

Ans: Font style properties are –

  1. Font–family: used to change the face of a font.
  2. Font-style: used to make a font italic or oblique.
  3. Font-varient: used to create a small-caps effect.
  4. Font-weight: used to increase or decrease how bold or light a font can appear.
  5. Font-size: used to increase or decrease the size of a font.