Web Designing Unit 2 Important Notes

0
Unit Syllabus Topics
UNIT 1 Introduction, Elements, Attributes, Headings, Paragraphs, Line Break, Pre Tag
UNIT 2 Formatting text, Lists (ordered, unordered, nested), Relative links, Absolute links, Link attributes, Inserting images
UNIT 3 Tables: Inserting a table, Table attributes, Table headers
UNIT 4 Form Elements, Form Attributes, Input Types, Input Form Attributes
UNIT 5 CSS, Inline, Internal and External CSS, Colors, Font, Sizes and Border, Padding and Margin, Linking to External CSS


UNIT 2 – Text Formatting, Lists, Links and Images


1. Text Formatting Tags

HTML provides formatting tags to change the appearance of text. These tags are used to make text bold, italic, underlined or highlighted.

Common Formatting Tags:

  • <b> – Bold text
  • <strong> – Important text
  • <i> – Italic text
  • <em> – Emphasized text
  • <u> – Underlined text
  • <mark> – Highlighted text

Example:
<b>Bold Text</b>
<i>Italic Text</i>

Q1. What are formatting tags?
Formatting tags are HTML tags used to change the appearance of text on a web page.


2. HTML Lists

HTML lists are used to display items in an ordered or unordered form.

Types of Lists

1. Ordered List

An ordered list displays items with numbers.

Syntax:

<ol>
  <li>Item</li>
</ol>

Example:

  1. HTML
  2. CSS
  3. JavaScript

2. Unordered List

An unordered list displays items with bullets.

Example:

  • Mouse
  • Keyboard
  • Monitor

Q2. What is a list?
A list is used to display related items in a structured manner.


3. HTML Links

HTML links are used to connect one web page to another. Links are created using the anchor (<a>) tag.

Syntax:
<a href="URL">Link Text</a>

Example:
<a href="https://www.google.com">Google</a>

Q3. What is a hyperlink?
A hyperlink is a clickable text or image that redirects the user to another web page.


4. HTML Images

Images make web pages attractive and meaningful. Images are added using the <img> tag.

Syntax:
<img src="image.jpg" alt="Image">

Attributes of <img> tag:

  • src – Specifies image path
  • alt – Alternative text
  • width – Image width
  • height – Image height

Q4. Why is the alt attribute important?
The alt attribute provides alternative text if the image cannot be displayed and helps screen readers.


Important Long Answer Question

Q5. Explain text formatting, lists, links and images in HTML.
Text formatting tags are used to style text such as bold and italic. Lists are used to display items in an ordered or unordered way. Links connect web pages using the anchor tag. Images are added using the img tag to enhance the appearance of web pages. All these elements help in creating structured and user-friendly web pages.

Post a Comment

0Comments

Post a Comment (0)