0% found this document useful (0 votes)
4 views

Notes_on_HTML_51

Uploaded by

aarav goel
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Notes_on_HTML_51

Uploaded by

aarav goel
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Notes on HTML 5

Class 7

HTML Body Tag


The <body> tag can also define the page's appearance, using attributes such as
bgcolor, background and text.
<body bgcolor="Yellow" text="blue">
bgcolor: This attribute is used to set the page's background color.
text: This attribute is used to set the color of the text on the page.
Background: This attribute is used to set the page’s background picture.
W2w
HTML Font Tag
The <font> tag defines the font characteristics. Size, color and typeface are defined
by the size, color and face attributes.

Attributes

Attribute Value Description

color Colorname Sets the color of the text.

face font_family Sets the typeface. Style of writing

size Number Sets the size of the text.

LINE BREAK

The <br> tag defines a line break, and is an empty element without a closing tag:

<p>This is a <br> paragraph with a line break.</p>

HTML Headings

HTML headings are defined with the <h1> to <h6> tags.


<h1> defines the most important heading. <h6> defines the least important
heading:

<h1>This is heading 1</h1>


<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>

HTML Paragraphs
HTML paragraphs are defined with the <p> tag:

<p>This is a paragraph.</p>
<p>This is another paragraph.</p>

HTML Images
HTML images are defined with the <img> tag.

<img src="abc.jpg">

HTML Horizontal Rules


The <hr> tag defines a thematic break in an HTML page, and is most often
displayed as a horizontal rule.

The <hr> element is used to separate content (or define a change) in an HTML
page:

<h1>This is heading 1</h1>


<p>This is some text.</p>
<hr>
<h2>This is heading 2</h2>
<p>This is some other text.</p>
<hr>

HTML Formatting Elements


Formatting elements were designed to display special types of text:
● <b> - Bold text (Syntax: <b>…..</b>)
● <i> - Italic text (Syntax: <i>…..</i>)
● <u> - Underline text (Syntax: <u>…..</u>)

HTML Comment Tag


You can add comments to your HTML source by using the following syntax:

<!-- Write your comments here -->

HTML Table

Tag Description

<table> Defines a table

<th> Defines a header cell in a table

<tr> Defines a row in a table

<td> Defines a cell in a table

tr - Defines a row in a table


table - Defines a table
td - Defines a cell in a table
th - Defines a header cell in a table

Example-
<table>
<tr>
<th>Company</th>
<th>Contact</th>
<th>Country</th>
</tr>
<tr>
<td>Alfreds Futterkiste</t jd>
<td>Maria Anders</td>
<td>Germany</td>
</tr>
<tr>
<td>Centro comercial Moctezuma</td>
<td>Francisco Chang</td>
<td>Mexico</td>
</tr>
</table>

List
Unordered HTML List

An unordered list starts with the <ul> tag. Each list item starts with the <li> tag.

The list items will be marked with bullets (small black circles) by default:

<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>

Value Description

disc Sets the list item marker to a bullet (default)

circle Sets the list item marker to a circle

square Sets the list item marker to a square


Ordered HTML List
An ordered list starts with the <ol> tag. Each list item starts with the <li> tag.

The list items will be marked with numbers by default:

<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>

Type Description

type="1" The list items will be numbered with numbers (default)

type="A" The list items will be numbered with uppercase letters

type="a" The list items will be numbered with lowercase letters

type="I" The list items will be numbered with uppercase roman numbers

type="i" The list items will be numbered with lowercase roman numbers

HTML Description Lists


HTML also supports description lists.

A description list is a list of terms, with a description of each term.

The <dl> tag defines the description list, the <dt> tag defines the term (name), and
the <dd> tag describes each term:
<dl>
<dt>Coffee</dt>
<dd>- black hot drink</dd>
<dt>Milk</dt>
<dd>- white cold drink</dd>
</dl>
HTML List Tags

Tag Description

<ul> Defines an unordered list

<ol> Defines an ordered list

<li> Defines a list item

<dl> Defines a description list

<dt> Defines a term in a description list

<dd> Describes the term in a description list

Example:
<html>
<head>
<title> Restaurant </title>
</head>
<Body bgcolor="Yellow" Text="blue">
<font color="Red">
<h1 align="center"> <b><u><i> Café Coffee Day </h1></b></u></i></font>
<img src=”coffee.jpg”>
<br>
<h2><u> About Us </h2></u>
<p> Café Coffee Day (CCD) is an Indian multinational chain of coffeehouses
headquartered in Bengaluru, Karnataka. It is a subsidiary of Coffee Day
Enterprises Limited. Internationally, CCDs are present in Austria, Czech Republic,
Malaysia, Nepal and Egypt.</p>
<ol type=”A”>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
<ul type=”square”>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>

<br>
<h2> <u> Contact Us</h2></u>
<br>
Name: XYZ
<br>
Phone Number: 95********
<hr color="green" size=10>
</body>
</html>

You might also like