0% found this document useful (0 votes)
1 views2 pages

HTML Notes

This document provides an overview of HTML basics, including the structure of an HTML document, the use of various elements like headings, paragraphs, links, and images, as well as attributes that can be applied to these elements. It emphasizes the importance of proper heading usage, styling options, and formatting elements for text. Additionally, it includes examples for clarity on how to implement these HTML components.

Uploaded by

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

HTML Notes

This document provides an overview of HTML basics, including the structure of an HTML document, the use of various elements like headings, paragraphs, links, and images, as well as attributes that can be applied to these elements. It emphasizes the importance of proper heading usage, styling options, and formatting elements for text. Additionally, it includes examples for clarity on how to implement these HTML components.

Uploaded by

balaji221balaji
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

HTML basics and elements:

1.<!DOCTYPE html>:All HTML documents must start with a document type declaration.
Example
<!DOCTYPE html>
<html>
<body>

<h1>My First Heading</h1>


<p>My first paragraph.</p>

</body>
</html>

2.The HTML document itself begins with <html> and ends with </html>.
3.The visible part of the HTML document is between <body> and </body>.
4.HTML headings are defined with the <h1> to <h6> tags.
<h1> defines the most important heading. <h6> defines the least important
heading.
5.HTML paragraphs are defined with the <p> tag.
6.HTML links are defined with the <a> tag:
Example
<a href="https://www.w3schools.com">This is a link</a>

*The link's destination is specified in the "href" attribute.


7.HTML images are defined with the <img> tag.
Example
The source file (src), alternative text (alt), width, and height are
provided as attributes:
8.The <html> element is the root element.
9.The <body> element defines the document's bod.
10.The <h1> element defines a heading.
11.The <p> element defines a paragraph.

HTML Attributes:

1.All HTML elements can have attributes


2.The href attribute of <a> specifies the URL of the page the link goes to
3.The src attribute of <img> specifies the path to the image to be displayed
4.The width and height attributes of <img> provide size information for images
5.The alt attribute of <img> provides an alternate text for an image
6.The style attribute is used to add styles to an element, such as color, font,
size, and more
7.The lang attribute of the <html> tag declares the language of the Web page
8.The title attribute defines some extra information about an element

Headings Are Important:


<h1> headings should be used for main headings, followed by <h2> headings, then the
less important <h3>

Bigger Headings:
the size for any heading with the style attribute, using the CSS font-size
property.
Example
<h1 style="font-size:60px;">Heading 1</h1>

HTML Paragraphs:
1.HTML Horizontal Rules:
The <hr> tag defines a thematic break in an HTML page.
Example
<h1>This is heading 1</h1>
<p>This is some text.</p>
<hr>
<h2>This is heading 2</h2>
<p>This is some other text.</p>
<hr>
2.HTML Line Breaks:
The HTML <br> element defines a line break.
Example
<p>This is<br>a paragraph<br>with line breaks.</p>
3.The HTML <pre> Element:
The text inside a <pre> element is displayed in a fixed-width font (usually
Courier), and it preserves both spaces and line breaks:
Example
<pre>
My Bonnie lies over the ocean.

My Bonnie lies over the sea.

My Bonnie lies over the ocean.

Oh, bring back my Bonnie to me.


</pre>

HTML Styles:
*Use the style attribute for styling HTML elements
<tagname style="property:value;">
*Use background-color for background color
<body style="background-color:powderblue;">
*Use color for text colors
<h1 style="color:blue;">This is a heading</h1
*Use font-family for text fonts
<h1 style="font-family:verdana;">This is a heading</h1>
*Use font-size for text sizes
<h1 style="font-size:300%;">This is a heading</h1>
*Use text-align for text alignment
<h1 style="text-align:center;">Centered Heading</h1>

HTML Formatting Elements:


*<b> - Bold text
*<strong> - Important text
*<i> - Italic text
*<em> - Emphasized text
*<mark> - Marked text
*<small> - Smaller text
*<del> - Deleted text
*<ins> - Inserted text
*<sub> - Subscript text
*<sup> - Superscript text

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy