Curriculum
Course: Ncert-Class 10 computer science
Login

Curriculum

Ncert-Class 10 computer science

Text lesson

Short Notes- Class 10- Computer Science-Chapter 2- HTML

Short Notes- Class 10- Computer Science-Chapter 2- HTML

 TryYour own Coding in online HTML Editor

Introduction to web page designing using HTML:

HTML (Hypertext Markup Language) is the standard markup language used to create web pages.

Web pages designed using HTML can be accessed using web browsers like Chrome, Firefox, Safari, etc.

To create an HTML document, you can use a simple text editor like Notepad on Windows or TextEdit on Mac. Save the file with a .html extension.

Example Coding

TRY YOURSELF

<!DOCTYPE html>

<html>

<head>

    <title>My First Web Page</title>

</head>

<body>

    <h1>Hello, World!</h1>

    <p>This is a basic HTML document.</p>

</body>

</html>

HTML tags:

<html>: Defines the root of an HTML document.

<head>: Contains meta-information about the document such as title, styles, scripts, etc.

<title>: Sets the title of the HTML document.

<body>: Contains the content of the HTML document visible to users.

<br>: Inserts a line break.

<hr>: Creates a horizontal rule (line).

<!– –>: Allows you to insert comments in the HTML code.

<h1> to <h6>: Headings with decreasing levels of importance.

<p>: Defines a paragraph.

<b>: Makes text bold.

<i>: Renders text in italics.

<u>: Underlines text.

<ul>: Defines an unordered list.

<ol>: Defines an ordered list.

<li>: Defines a list item.

<dl>, <dt>, <dd>: Creates description lists where <dt> defines terms and <dd> defines descriptions.

Attributes like text, background, bgcolor, link, vlink, alink, start, type can be used with relevant tags.
Example Code

<!DOCTYPE html>

<html>

<head>

    <title>HTML Tags Example</title>

</head>

<body>

    <h1>This is a Heading</h1>

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

    <ul>

        <li>Item 1</li>

        <li>Item 2</li>

    </ul>

    <ol>

        <li>Item 1</li>

        <li>Item 2</li>

    </ol>

</body>

</html>

Font tags:

<font>: Allows you to specify font-related attributes such as face, size, color.

Example Coding

<!DOCTYPE html>

<html>

<head>

    <title>Font Example</title>

</head>

<body>

    <p><font face=”Arial” size=”4″ color=”blue”>This text is styled with font tag attributes.</font></p>

</body>

</html>

Insert images: 

<img>: Inserts an image with attributes like src (source), width, height, alt (alternative text for accessibility).

<sup>: Renders text as superscript.

<sub>: Renders text as subscript.

Example Coding:

<!DOCTYPE html>

<html>

<head>

    <title>Image Example</title>

</head>

<body>

    <img src=”example.jpg” alt=”Example Image” width=”200″ height=”150″>

</body>

</html>

 

 

 

 

 

×

Cart