Professional Documents
Culture Documents
1 ) Introduction to HTML
a. HTML Attributes
b. Empty and container tags
HTML
Hypertext Markup Language (HTML) is the
standard markup language for documents designed to be
displayed in a web browser. It can be assisted by
technologies such as Cascading Style Sheets (CSS)
and scripting languages such as JavaScript.
a. HTML Attributes
Attributes define additional characteristics or properties
of the element such as width and height of an image.
Attributes are always specified in the start tag (or
opening tag) and usually consists of name/value pairs
like name="value". Attribute values should always be
enclosed in quotation marks.
Container Tag –
Syntax:
A.8)<BR> Tag
The <br> tag inserts a single line break.
Example
The <br> tag inserts a single line break:
<p>To force<br> line breaks<br> in a
text,<br> use the br<br> element.</p>
A.9)<P> tag
The <p> tag defines a paragraph of text. It is a block-level
element and always starts on a new line. Before and after
each paragraph, browsers add margin automatically. You
can modify the margins using the CSS margin property .
If you need to just to move text to a new line use
the <br> tag.
Syntax
The <p> tag comes in pairs. The content is written
between the opening (<p>) and closing (</p>) tags. If the
closing tag is omitted, it is considered that the end of the
paragraph matches with the start of the next block-level
element.
Example
p {display: block;
margin-top: 1em;
margin-bottom: 1em;
margin-left: 0;
margin-right: 0;}
Syntax
The <font> tag comes in pairs. The content is written between the opening (<font>)
and closing (</font>) tags.
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
Example
<div style="background-color:lightblue">
<h3>This is a heading</h3>
<p>This is a paragraph.</p>
</div>