0% found this document useful (0 votes)
3 views10 pages

Section 2 HTML

This document introduces HTML, focusing on the <hr> element for creating horizontal rules and various text formatting tags such as <b>, <i>, <u>, and <blockquote>. It provides practical examples of HTML code and describes properties for the <hr> element, including size, width, alignment, and color. Additionally, it covers other formatting options like <sub>, <sup>, <mark>, <span>, and <div>.

Uploaded by

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

Section 2 HTML

This document introduces HTML, focusing on the <hr> element for creating horizontal rules and various text formatting tags such as <b>, <i>, <u>, and <blockquote>. It provides practical examples of HTML code and describes properties for the <hr> element, including size, width, alignment, and color. Additionally, it covers other formatting options like <sub>, <sup>, <mark>, <span>, and <div>.

Uploaded by

Shehab Ragab
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Section 2

Introduction to HTML

TA: Norhan Swidan


Horizontal Rule, <hr>
- The <HR> element causes the browser to display a horizontal line
(rule).
- <HR> is an Empty Tag.
Practical Example

<!DOCTYPE html>
<html>
<head>
<title>example page</title>
</head>
<body>
<h1>Heading 1</h1>
<p>Paragraph 1, <br>line 2 </p>
<hr>
<p>Line 3 <br>... </p>
</body>
</html>
HTML Hr Properties

1- size: Height in pixels. Default is 2 pixels.

2- width: Width in pixels or percentage. (100%).

3- align: left | right | center.

4- color: sets a color for the rule.


Text Formatting
- <b> or <strong>: changes the text into bold.
<b> this is the text to be bold </b>

<strong> this is the text to be bold </strong>

- <i> or <em>: changes the text into italic.

<i> this is the text to be italic </i>

<em> this is the text to be italic </em>


Text Formatting
- <u>, <ins>: adds an underline to the text.
<u> this is the text to be underlined </u>

<ins> this is the text to be underlined </ins>

- <strike>, <del>: strikes a line through the text.

<strike> strike-through text </strike>

<del> Deleted text </del>


Text Formatting
- <pre>: this tag supports blank spaces and line breaks as the user
types in the code.

<pre> text
here </pre>

- <small>: enforces the browser to use smaller font.

<small> small font </small>


Text Formatting
- <big>: enforces the browser to use a bigger font.
<big> big font </big>

- <blockquote>: creates indents from both sides in the document.

<blockquote> Text </blockquote>

- <center>: enforces the browser to center the text.

<center> centered text </center>


Text Formatting
- <sub>: places text in subscript style position.
<sub> subscript position </sub>

- <sup>: places text in superscript style position.

<sup> Superscript position </sup>

- <mark>: adds a highlight behind the text.

<mark> highlighted text </mark>


Text Formatting
- <Span>: creates a division in the tag data (tag division).
<p>this is a <span>a span in</span> inside a
paragraph</p>

- <div>: creates a division in the document (page division) and can


contain other tags.

<div align="left"><p>….</p></div>

You might also like