Computer Science, asked by bxxjsjsjs, 4 months ago

Form a CSS code within for the following specifications:
1)Image should not be repeated in the background
2)For the paragraph alignment is 200
3)Image should be floating and in right 4)Background should be scrollable and not fixed

Answers

Answered by neev76
0

Answer:

Contents

Formatting

Background color

Alignment

Floating objects

Float an object

Float text around an object

Fonts

Font style elements: the TT, I, B, BIG, SMALL, STRIKE, S, and U elements

Font modifier elements: FONT and BASEFONT

Rules: the HR element

This section of the specification discusses some HTML elements and attributes that may be used for visual formatting of elements. Many of them are deprecated.

15.1 Formatting

15.1.1 Background color

Attribute definitions

bgcolor = color [CI]Deprecated. This attribute sets the background color for the document body or table cells.

This attribute sets the background color of the canvas for the document body (the BODYelement) or for tables (the TABLE, TR, TH, and TD elements). Additional attributes for specifying text color can be used with the BODY element.

This attribute has been deprecated in favor of style sheets for specifying background color information.

15.1.2 Alignment

It is possible to align block elements (tables, images, objects, paragraphs, etc.) on the canvas with the align element. Although this attribute may be set for many HTML elements, its range of possible values sometimes differs from element to element. Here we only discuss the meaning of the align attribute for text.

Attribute definitions

align = left|center|right|justify [CI]Deprecated. This attribute specifies the horizontal alignment of its element with respect to the surrounding context. Possible values:

left: text lines are rendered flush left.

center: text lines are centered.

right: text lines are rendered flush right.

justify: text lines are justified to both margins.

The default depends on the base text direction. For left to right text, the default is align=left, while for right to left text, the default is align=right.

DEPRECATED EXAMPLE:

This example centers a heading on the canvas.

<H1 align="center"> How to Carve Wood </H1>

Using CSS, for example, you could achieve the same effect as follows:

<HEAD> <TITLE>How to Carve Wood</TITLE> <STYLE type="text/css"> H1 { text-align: center} </STYLE> <BODY> <H1> How to Carve Wood </H1>

Note that this would center all H1declarations. You could reduce the scope of the style by setting the class attribute on the element:

<HEAD> <TITLE>How to Carve Wood</TITLE> <STYLE type="text/css"> H1.wood {text-align: center} </STYLE> <BODY> <H1 class="wood"> How to Carve Wood </H1>

DEPRECATED EXAMPLE:

Similarly, to right align a paragraph on the canvas with HTML's align attribute you could have:

<P align="right">...Lots of paragraph text...

which, with CSS, would be:

<HEAD> <TITLE>How to Carve Wood</TITLE> <STYLE type="text/css"> P.mypar {text-align: right} </STYLE> <BODY> <P class="mypar">...Lots of paragraph text...

DEPRECATED EXAMPLE:

To right align a series of paragraphs, group them with the DIV element:

<DIV align="right"> <P>...text in first paragraph... <P>...text in second paragraph... <P>...text in third paragraph... </DIV>

With CSS, the text-align property is inherited from the parent element, you can therefore use:

<HEAD> <TITLE>How to Carve Wood</TITLE> <STYLE type="text/css"> DIV.mypars {text-align: right} </STYLE> <BODY> <DIV class="mypars"> <P>...text in first paragraph... <P>...text in second paragraph... <P>...text in third paragraph... </DIV>

To center the entire document with CSS:

<HEAD> <TITLE>How to Carve Wood</TITLE> <STYLE type="text/css"> BODY {text-align: center} </STYLE> <BODY> ...the body is centered... </BODY>

The CENTER element is exactly equivalent to specifying the DIV element with the alignattribute set to "center". The CENTERelement is deprecated.

15.1.3 Floating objects

Images and objects may appear directly "in-line" or may be floated to one side of the page, temporarily altering the margins of text that may flow on either side of the object.

Float an object 

The align attribute for object, images, tables, frames, etc., causes the object to float to the left or right margin. Floating objects generally begin a new line. This attribute takes the following values:

left: Floats the object to the current left margin. Subsequent text flows along the image's right side.

right: Floats the object to the current right margin. Subsequent text flows along the image's left side.

DEPRECATED EXAMPLE:

The following example shows how to float an IMG element to the current left margin of the canvas.

<IMG align="left" src="http://foo.com/animage.gif" alt="my boat">

Some alignment attributes also permit the "center" value, which does not cause floating, but centers the object within the current margins. However, for P and DIV, the value "center" causes the contents of the element to be centered.

Float text around an object 

Another attribute, defined for the BRelement, controls text flow around floating objects.

Attribute definitions

clear = none|left|right|all [CI]Deprecated. Specifies where the next line should appear in a visual browser after the line break caused by this element. This attribute takes into account floating objects (images, tables, etc.). Possible values:

Similar questions