0% found this document useful (0 votes)
13 views4 pages

HTML Tags

The document provides an overview of HTML and CSS, detailing various elements and styles that can be applied to web pages. It explains inline, internal, and external CSS methods for styling, along with examples for each. Additionally, it covers background images and how to control their repetition in web design.

Uploaded by

anand
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views4 pages

HTML Tags

The document provides an overview of HTML and CSS, detailing various elements and styles that can be applied to web pages. It explains inline, internal, and external CSS methods for styling, along with examples for each. Additionally, it covers background images and how to control their repetition in web design.

Uploaded by

anand
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

<tagname style="property:value;">

<body style="background-color:powderblue;">

<p style="color:red;">This is a red paragraph.</p>

<h1 style="font-size:60px;">Heading 1</h1>

<h1 style="font-size:300%;">This is a heading</h1>

<p style="text-align:center;">Centered paragraph.</p>

Use font-family for text fonts

♥ The HTML <mark> element defines text that should be marked or highlighted:
<p>Do not forget to buy <mark>milk</mark> today.</p>

♥ HTML <del> Element


The HTML <del> element defines text that has been deleted from a document. Browsers
will usually strike a line through deleted text:
<p>My favorite color is <del>blue</del> red.</p>

♥HTML <ins> Element


The HTML <ins> element defines a text that has been inserted into a document.
Browsers will usually underline inserted text:

<p>My favorite color is <del>blue</del> <ins>red</ins>.</p>

♥ <p> style="border:2px solid Tomato;">Hello World</p>

♥ <style>
body {background-color: powderblue;}
h1 {color: blue;}
p {color: red;}
</style>
and below do
h1 ,p ,h1,h1, p etc.

♥ division of tags

i.header tag
ii.main tag {1. section --> 2.article --> 3.aside}
iii.footer tag

♦ inline and
block elements

{{{{{ pic and their wekipedia , link school logo and link with website,drop down
menu
...................................................................................
..............................................................
Using CSS

CSS can be added to HTML documents in 3 ways:

Inline - by using the style attribute inside HTML elements


Internal - by using a <style> element in the <head> section
External - by using a <link> element to link to an external CSS file
...................................................................................
...............................................................
Inline CSS
An inline CSS is used to apply a unique style to a single HTML element.

An inline CSS uses the style attribute of an HTML element.

The following example sets the text color of the <h1> element to blue, and the text
color of the <p> element to red:

Example
<h1 style="color:blue;">A Blue Heading</h1>

...................................................................................
.............................................................
Internal CSS

An internal CSS is used to define a style for a single HTML page.

An internal CSS is defined in the <head> section of an HTML page, within a <style>
element.

The following example sets the text color of ALL the <h1> elements (on that page)
to blue, and the text color of ALL the <p> elements to red. In addition, the page
will be displayed with a "powderblue" background color:

Example
<!DOCTYPE html>
<html>
<head>
<style>
body {background-color: powderblue;}
h1 {color: blue;}
p {color: red;}
</style>
</head>
<body>

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>
</html>
...................................................................................
...............................................................

External CSS
An external style sheet is used to define the style for many HTML pages.

To use an external style sheet, add a link to it in the <head> section of each HTML
page:

Example
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>
</html>
The external style sheet can be written in any text editor. The file must not
contain any HTML code, and must be saved with a .css extension.

Here is what the "styles.css" file looks like:

"styles.css":
body {
background-color: powderblue;
}
h1 {
color: blue;
}
p {
color: red;
}
...................................................................................
.............................................................
♣ to do
division method of finding roots
vedic maths ..6th
...................................................................................
................................................................
Add a background image for the entire page:

<style>
body {
background-image: url('img_girl.jpg');
}
</style>
...................................................................................
..............................................................
You can also specify the background image in the <style> element, in the <head>
section:

Example
Specify the background image in the <style> element:

<style>
p {
background-image: url('img_girl.jpg');
}
</style>
...................................................................................
..............................................................

To avoid the background image from repeating itself, set the background-repeat
property to no-repeat.

Example
<style>
body {
background-image: url('example_img_girl.jpg');
background-repeat: no-repeat;
}
</style>
...................................................................................
.............................................................

You might also like