मराठी

What are three ways of creating style rules? Give examples of each.

Advertisements
Advertisements

प्रश्न

What are three ways of creating style rules? Give examples of each.

कोड लेखन
सविस्तर उत्तर
Advertisements

उत्तर

The three ways of creating style rules are as follows:

  1. Inline: Styles are integrated directly into the HTML code they modify.
    For example,
    <h3 style = "font.family = Arial ; color = red ">
  2. Internal: Styles are applied to the website’s header data, which then influences all of the relevant tags on the page.
    For example,
    <head>
    <style type = "text/css">
    h3 { font.family : Arial ; color : red ; }
    </style>
    </head>
  3. External: Styles are referenced from within the header of the real web page after being coded in a different document. Let’s take the example of a CSS file called sample.css:
    h3 { font.family : Arial ; color : red ; }
    
    p { font.family : Times New Roman ; color : blue ; }
    
    ...and so on...

The <link tag is used as follows to connect the sample.css file to an HTML document:

<head>
<link rel = "Style sheet" type = "text/css" href = "sample.css">
</head>
shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 6: Cascading Style Sheets (CSS) - Assignment [पृष्ठ २७५]

APPEARS IN

सुमिता अरोरा Computer Applications [English] Class 10
पाठ 6 Cascading Style Sheets (CSS)
Assignment | Q 15. | पृष्ठ २७५
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×