write the HTML tag or CSS rule for the following. a)insert a line break in a web page. .................. b)set the red colour for paragraph text on a web page. .................. c)set distance between two lines of text on a web page as 15px. ............... d) Set font for the text in a web pages as Bookman ......................
Answers
HEY MATE ! Here's your answer :)
Answer:-
To add a empty line just by using a code, you should add the following tag to your .html document.
<br>
To set a specific color ( in this case red ) you'll have to enter the following code:
By using only HTML:-
<p style="color: red;"> Here will go your paragraph content </p>
By using CSS code:-
<p class="rcolor"> Hello, World !</p>
(in css file)
p.rcolor {
color: red;
}
(c) To set a specific distance in between lines, you should add a CSS code which is given below:-
.custmdis {
line-height: 15px;
}
And a class to any tag (<p>, <div>, <span> )
<p class="custmdis"> Here goes you text </p>
(d) To set a specific font (bookman), add the following code (this can be done in CSS also)
<body style="font-family: Bookman;">
Hello, World !
</body>
(CSS code)
body {
font-family: Bookman;
}
*But you will have to import that font using a link in html or in CSS, which will be:-
<link rel="stylesheet" href="" > (*add the link in the href="" attribute)
(CSS code)
( I am sorry, as 'Bookman' font is a paid font so i'll not be able to provide its link but i'll provide another font's import code)
@import url("https://fonts.googleapis.com/css?family=Raleway:400,400i,700");
HOPE THIS HELPS YA :)
No Spamming❗❕...
HTML element
The <br> HTML element produces a line break in text (carriage-return). It is useful for writing a poem or an address, where the division of lines is significant.
The <br> tag inserts a single line break. The <br> tag is useful for writing addresses or poems. The <br> tag is an empty tag which means that it has no end tag.
Use the correct HTML attribute, and CSS, to set the color of the paragraph to "blue". style. color:blue. ;">This is a paragraph.
To add background color in HTML, use the CSS background-color property. Set it to the color name or code you want and place it inside a style attribute. Then add this style attribute to an HTML element, like a table, heading, div, or span tag.
How to add a line-break using CSS
- Set the content property to "\a" (the new-line character).
- Set the white-space property to pre . This way, the browser will read every white-space, in myClass , as a white-space.
The <p> tag defines a paragraph. Browsers automatically add a single blank line before and after each <p> element.
A line break is the termination of the line of a poem and the beginning of a new line. The process of arranging words using lines and line breaks is known as lineation, and is one of poetry's defining features. A distinct numbered group of lines in verse is normally called a stanza.
Inline - by using the style attribute inside HTML elements. Internal - by using a <style> element in the <head> section.
Inline CSS: Inline CSS contains the CSS property in the body section attached with element is known as inline CSS. This kind of style is specified within an HTML tag using the style attribute. Example: html.
CSS can be written either: outside your HTML file. inside your HTML file.
...
External CSS
- A general folder for the project ("website").
- The "website" folder contains a file called index. html.
- The "website" folder contains another folder called "css."
- The "css" folder contains a file called "style. css."
In the css file you could use: * {background-color: black} // All elements now have a black background. html {background-color: black} // The page now have a black background, all elements remain the same.
In CSS, we use the background-color property to specify the background color of an element. In the code snippet below, the entire color of the web page is set using the background-color property.