0% found this document useful (0 votes)
14 views8 pages

Ict - HTML Notes

Chapter 8 provides an introduction to HTML, explaining that it is a markup language used to create web pages, and details how to create and view HTML pages using various editors. It covers the basic structure of an HTML page, common tags and attributes, and how to insert images and hyperlinks. Chapter 9 expands on lists and tables in HTML, including examples of unordered, ordered, and description lists, as well as the main tags and attributes used for creating tables.

Uploaded by

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

Ict - HTML Notes

Chapter 8 provides an introduction to HTML, explaining that it is a markup language used to create web pages, and details how to create and view HTML pages using various editors. It covers the basic structure of an HTML page, common tags and attributes, and how to insert images and hyperlinks. Chapter 9 expands on lists and tables in HTML, including examples of unordered, ordered, and description lists, as well as the main tags and attributes used for creating tables.

Uploaded by

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

Chapter 8: Introduction to HTML - Revision Notes

1. What is HTML?

 HyperText Markup Language.

 It's a special language used to create web pages (the pages you see on
the internet).

 It's not a "programming language," but a "markup language" which


means it tells web browsers how to show content.

 HTML files are saved with .htm or .html at the end (e.g., [Link]).

 It doesn't care about capital letters (e.g., <HTML> is the same as


<html>).

2. How to Create and View HTML Pages

 HTML Editor: Software used to write HTML code.

o Text Editor: Like Notepad or WordPad, where you type the code
yourself.

o WYSIWYG Editor (What You See Is What You Get): Helps


create pages without writing all the code (e.g., Adobe
Dreamweaver).

Steps to make a simple HTML page in Notepad:

1. Open Notepad (Start Menu > All Programs > Accessories > Notepad).

2. Type your HTML code.

3. Save the file: Go to File > Save As.

o Give it a name like [Link].

o Change "Save as type" to "All Files".

4. View your page: Find your saved .html file in File Explorer, right-click it,
choose "Open with," and select a web browser (like Chrome, Firefox, or
Edge).

3. Basic Parts of an HTML Page


Every HTML page has a main structure:

<HTML>
<HEAD>
<TITLE> My Page Title </TITLE>
</HEAD>
<BODY>
<!-- All your visible content goes here -->
</BODY>
</HTML>

 <HTML> tag: First and last tag. Tells the browser it's an HTML
document.

 <HEAD> tag: Contains information about the page (like title). Not
shown on the page.

o <TITLE> tag: Inside <HEAD>. Text appears in browser tab/title


bar.

 <BODY> tag: Contains all visible content (text, images, links, etc.).

<BODY> attributes:

 text="blue" — Makes all text blue.

 bgcolor="green" — Makes background green.

 background="[Link]" — Sets image as background.

4. HTML Tags and Attributes

Tags

Keywords like <HTML>, <BODY>, <P>.

 Container Tags: Have opening and closing tags (e.g., <B>Text</B>).

 Empty Tags: Only opening tag (e.g., <BR>, <IMG>).

Attributes

Extra information inside opening tags.

Example:

<IMG src="[Link]" width="100">


 src and width are attributes.

 Written as: name="value".

5. Common HTML Tags and Their Uses

Headings (<H1> to <H6>)

 <H1> is largest, <H6> is smallest.


Example:

<h1>Chapter 1</h1>

Paragraph (<P>)

Example:

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

align attribute: left, center, right, justify.

Line Break (<BR>)

Example:

Line 1<BR>Line 2

Formatting Tags

 <B> — Bold

 <I> — Italic

 <U> — Underline

 <SUP> — Superscript (X<SUP>2</SUP>)

 <SUB> — Subscript (H<SUB>2</SUB>O)

 <CENTER> — Centers content

Horizontal Rule (<HR>)

Example:

<HR size="3" width="50%" color="red">

Attributes: size, width, color, align, noshade.


Comment Tag

<!-- This is a note -->

Inserting Images (<IMG>)

Attributes:

 src="[Link]"

 alt="A cat"

 width="200"

 height="150"

 align="right"

 border="2"

Example:

<IMG src="[Link]" alt="My Vacation Photo" width="300"


border="1">

Hyperlinks (<A>)

Attributes:

 href="link_address"

 name="section_id"

 target="_blank"

Example:

<A href="[Link] to Google</A>

Chapter 9: Elementary HTML - Revision Notes

1. Lists in HTML

Unordered List (<UL>)


Example:

<UL type="square">
<LI>Milk</LI>
<LI>Bread</LI>
</UL>

Types: disc, circle, square.

Ordered List (<OL>)

Example:

<OL type="A" start="3">


<LI>First Step</LI>
<LI>Second Step</LI>
</OL>

Types:

 1

 a

 A

 i

 I

Description List (<DL>)

Example:

<DL>
<DT>HTML</DT>
<DD>HyperText Markup Language, used to create web pages.</DD>
</DL>

Nested List

Example:
<UL>
<LI>Fruits
<OL>
<LI>Apple</LI>
<LI>Banana</LI>
</OL>
</LI>
<LI>Vegetables</LI>
</UL>

2. Tables in HTML

Main Tags

 <TABLE>

 <CAPTION>

 <TR>

 <TH>

 <TD>

Table Example

<TABLE border="1">
<CAPTION>Student Marks</CAPTION>
<TR bgcolor="lightblue">
<TH>Name</TH>
<TH>Marks</TH>
</TR>
<TR>
<TD>Alice</TD>
<TD>85</TD>
</TR>
</TABLE>

Important Attributes

 align

 bgcolor

 border
 bordercolor

 cellpadding

 cellspacing

 height

 width

 colspan

 rowspan

 nowrap

3. <FONT> Tag

Example:

<P><FONT face="Verdana" size="4" color="green">


Hello Grade 6!
</FONT></P>

Attributes:

 face

 size (1–7)

 color

4. Setting Page Margins

Example:

<BODY leftmargin="30" topmargin="20" bgcolor="lightyellow">


<P>This page has custom margins.</P>
</BODY>

Attributes:

 leftmargin

 rightmargin

 topmargin
 bottommargin

Common questions

Powered by AI

The use of the comment tag in HTML is recommended for documenting and clarifying code, particularly in complex documents. It enables developers to leave explanatory notes that do not render on the webpage, aiding comprehension during site maintenance or collaboration. Proper implementation involves placing content within <!-- and --> markers, ensuring exclusion from execution. This practice promotes efficient management of HTML code, especially in projects with multiple contributors, by providing contextual guidance .

Setting page margins in HTML using attributes like leftmargin and topmargin affects the space between the content and the browser edges. Customizing these margins offers layout control, enhancing readability and visual appeal by preventing content from being too close to the edges. This is particularly beneficial in creating aesthetic balance and aligning content for different screen sizes or presentations, thereby improving the user experience by maintaining a tidy and professional layout .

Ordered lists (<OL>) use a sequential order with defined types such as numbers (1, 2, 3) or letters (A, B, C), often aiding in step-by-step instructions. Unordered lists (<UL>) use bullet points like discs, circles, or squares, ideal for simple listings where order is not necessary. Description lists (<DL>) match terms (<DT>) with definitions (<DD>), useful for glossaries or definitions. Each list type contributes uniquely to webpage organization by offering structured information presentation suited to different content forms .

The essential components of an HTML document include the <HTML>, <HEAD>, and <BODY> tags. The <HTML> tag defines the document as an HTML file and encloses all other content. The <HEAD> tag contains meta-information about the document, such as the <TITLE> tag that sets the text appearing in the browser's tab or title bar, which influences user navigation. The <BODY> tag includes actual content to be rendered by the browser, such as text, images, and links, thereby directly affecting the webpage's display .

HTML differentiates between container tags and empty tags based on whether they require both opening and closing tags. Container tags, such as <B> and <P>, enclose content with both opening and closing tags to apply properties to the enclosed text (e.g., <B>Text</B>). Empty tags, such as <BR> and <IMG>, do not enclose any content and therefore only have an opening tag to perform an independent function, like creating a line break or embedding an image .

The <FONT> tag in HTML allows for text styling by utilizing attributes such as face, size, and color. The face attribute changes the typeface, enabling typography variations. The size attribute adjusts text size, providing emphasis or conformity. The color attribute defines the text's color, enhancing visual hierarchy or brand adherence. These customizations through the <FONT> tag contribute to the overall design aesthetic and readability of web content .

The HTML tags for bold (<B>), italic (<I>), and underline (<U>) text styling enhance emphasis, draw attention, and convey meaning. The advantages include improved readability, visual interest, and emphasis on key information. However, excessive use can lead to visual clutter, reducing overall readability. Additionally, underlining is often reserved for hyperlinks, which could confuse users if misapplied. Therefore, using these tags judiciously ensures effective communication without diminishing the webpage's clarity .

Attributes within HTML tags provide additional information and settings that enhance webpage design flexibility and customization. For instance, attributes like text and bgcolor in the <BODY> tag allow designers to customize text color and background color, affecting aesthetic appeal. Similarly, <IMG> tag attributes such as src, alt, and width permit precise control over picture display, enhancing accessibility and layout. Additionally, hyperlink attributes like href and target allow for seamless navigation and interaction between webpages, enriching user experience .

Table-related tags such as <TABLE>, <TR>, <TH>, and <TD> are fundamental for organizing data within HTML documents. The <TABLE> tag establishes the overall structure, <TR> defines rows, <TH> sets headers for clarity, and <TD> specifies individual data cells. Attributes like border, cellpadding, and cellspacing enhance visual separation and cell spacing, boosting legibility. By utilizing these elements, data is displayed clearly in a tabular format, facilitating user comprehension and effective data presentation on web pages .

WYSIWYG editors (What You See Is What You Get) differ from text editors by providing a visual interface for webpage design, allowing users to create and edit HTML documents without manual code manipulation. This offers the advantage of user-friendliness and reduced design time. In contrast, text editors like Notepad require direct HTML code input, offering greater control and understanding of the code structure but requiring more technical skill. Each tool caters to different user needs: WYSIWYG for efficiency and accessibility, and text editors for precision and learning .

You might also like