0% found this document useful (0 votes)
10 views

What Is HTML

HTML is a markup language used to structure and present content on the web. It uses tags to define headings, paragraphs, lists and other elements. Common HTML tags were described along with attributes like ID, class and title. Nested elements and empty elements were also explained.
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

What Is HTML

HTML is a markup language used to structure and present content on the web. It uses tags to define headings, paragraphs, lists and other elements. Common HTML tags were described along with attributes like ID, class and title. Nested elements and empty elements were also explained.
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

what is html??

HTML is an acronym which stands for Hyper Text Markup Language which is used for
creating web pages and web applications.HyperText is a way to link two or more web
pages (HTML documents) with each other.Markup language makes text
more interactive and dynamic. 'markup language' denotes a language that utilizes a
specific set of tags.

what is formatting???
HTML Formatting is a process of formatting text for better look and feel. HTML
provides us ability to format text without using CSS.2 types of formatting tags
are:
Physical tag: These tags are used to provide the visual appearance to the text.
Logical tag: These tags are used to add some logical or semantic value to the text.
<b>: is used to bold the text written between it.
<strong>:tells the browser that the text is important.
<i>:is used to make text italic.
<em>:is used to display content in italic.
<mark>:is used to highlight text.
<u>:is used to underline text written between it.
<tt>:is used to appear a text in teletype. (not supported in HTML5)
<strike>:is used to draw a strikethrough on a section of text. (Not supported in
HTML5)
<sup>:It displays the content slightly above the normal line.
<sub>:It displays the content slightly below the normal line.
<del>:is used to display the deleted content.
<ins>:displays the content which is added
<big>:is used to increase the font size by one conventional unit.
<small>:is used to decrease the font size by one unit from base font size.

HTML Anchor tag???


The HTML anchor tag defines a hyperlink that links one page to another page. The
"href" attribute is the most important attribute of the HTML a tag. and which links
to destination page or URLThe href attribute is used to define the address of the
file to be linked.If we want to open that link to another page then we can use
target attribute of <a> tag. With the help of this link will be open in next
page.target attribute: Specifies where to open the linked document.
Target Attribute Values
_blank: Opens the linked document in a new window or tab.
_top: Opens document in the full body of the window.
_self: Opens document in the same window or tab (default behavior).
_parent: Opens the linked document in the parent frame.

Links typically appear in different colors based on their state:


Active: Displayed in red and underlined like this sentence
Visited: Appears purple and underlined like this sentence
Unvisited: Shown as blue and underlined like this sentence

What is a Web Browser?


A web browser is a program that understands HTML tags and renders them in a human-
readable format
The <!DOCTYPE html> declaration informs the web browser about the HTML version
being used. The latest version is HTML5.
The <head> tag contains metadata and links to external resources like CSS and
JavaScript files.
The <html> tag is the root element that encapsulates all the content on the page.
The <title> tag sets the title of the web page, which is displayed in the browser's
title bar or tab.
The <body> tag contains the visible content of the web page. This is where text,
images, and other elements go.

TAGS:-
<br>: Line break.
<hr>: Horizontal rule.
<ul>: Unordered list.
<ol>: Ordered list.
<li>: List item.
<a>: Anchor (used for links).
<img>: Image.
<audio>: Audio content.
<video>: Video content.

1. Paired Tags (Container Tags)


These are tags that come in pairs, consisting of an opening tag and a corresponding
closing tag. The content goes between these two tags.

Opening Tag: The opening tag starts with < and ends with >. For example, <p>.
Closing Tag: The closing tag also starts with < but includes a forward slash /
before the tag name, and ends with >.
2. Unpaired Tags (Self-Closing Tags or Stand-Alone Tags)
These are tags that don't require a closing tag. They are self-contained,
encapsulating all the information within a single tag.

Self-Closing Tag: A self-closing tag starts with < and ends with /> (though the /
is optional in HTML5). For example, <img /> or <br>.

What is a Nested HTML Element?


A nested HTML element is an HTML structure where one element is placed inside
another element.

The enclosing element is often referred to as the "parent," while the enclosed
element is called the "child."

Nested HTML Element = One HTML Element Inside Another HTML Element

For example:

<h1><b>This is our first heading</b></h1>


In this example, the <b> element (child) is nested inside the <h1> element
(parent).

An empty HTML element is one that does not have a closing tag or content. These
elements are also known as "void elements" or "self-closing elements."

Empty HTML Element = Tags with No Content

HTML attributes are used to define the characteristics of an HTML element. They are
placed within the element's opening tag and consist of two parts: the name and the
value.

Name: Specifies the property for that element.


Value: Sets the value of that property for the element.
There are three main types of HTML attributes:

Core Attributes: These are basic attributes that can be applied to most HTML
elements. Examples include id, class, and style.
Internationalization Attributes: These attributes help adapt the document to
different languages and regions. Examples include lang and dir.

Generic Attributes: These attributes provide additional information about the


element

ID Attribute
The ID attribute is used to assign a unique identifier to an HTML element. Each
element with an ID has its own unique identity,

Class Attribute
The class attribute is used to associate an HTML element with a particular class,
typically for styling or JavaScript manipulation.

In CSS, elements with IDs are selected using a hash (#) symbol before the ID, and
elements with classes are selected using a dot (.) before the class name.

Title Attribute
The title attribute provides additional information about an element and is often
displayed as a tooltip when the mouse hovers over it.

HTML Comments
Comments are ignored by web browsers.
They aid in code readability and documentation.
HTML comments are denoted by <!-- content -->.
The shortcut key for commenting out code is Ctrl + /.
HTML supports both single-line and multi-line comments.

Skeleton Tags :-
1.HTML Tag
2.Head Tag
3.Body Tag

Image Tags:-
In HTML, the <img> tag is used to embed images into web pages. <img
src="images/profile_picture.jpg" alt="Profile Picture" />.The "src" and "alt"
attributes are essential for the proper functioning of the <img> tag.
src attribute: Specifies the path to the image file.
alt attribute: Provides a text description for the image.

Pre Tags:-
The <pre> tag is most effective when you want the text to display on your HTML page
exactly as it was typed, without any formatting changes. It is especially useful
for displaying code snippets or preformatted text from data files.

You might also like