Computer Science, asked by reetika9, 5 months ago

Write the html code to design the following web page:-
Title of web page is " HTML"
Set background colour as yellow.
Heading should be center aligned,
Paragraph in Arial font, capitalized with thick dashed border. (write few lines on HTML
in the paragraph)​

Answers

Answered by sujitatripathi9109
0

Answer:

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 H1 declarations. 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:

Similar questions