Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
8 views

HTML Programming Notes

Uploaded by

velavannithi07
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

HTML Programming Notes

Uploaded by

velavannithi07
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

HTML (Hyper Text Markup Language) is the

standard language used to create and design web


pages. It provides the structure and layout of a
webpage using a system of elements, which are
marked up with tags.
Basic Structure of an HTML Document

• <!DOCKTYPE html>: Declares the document type


and version of HTML.
• <html>: The root element containing all other
elements.
• <head>: Contains meta-information about the
document.
• <title>: Sets the title of the webpage (displayed
in the browser's title bar).
• <body>: Contains the content of the webpage
(text, images, links, etc.).
Common HTML Elements
• Headings: Define Headings with <h1> to <h2>,
where <h1> is the highest level and <h6> is the
lowest.

• paragraphs: Defines paragraphs with <p>.


• Links: Create hyperlinks with <a> and HREF
attribute.

• Images: embed images with <img> and the scr


and alt attributes.

• List: create unordered lists with <url>, ordered


lists with <ol>, and list items with <li>.
Attributes
Attributes provide additional information about
HTML elements and are included in the opening
tag.
• Common Attributes:
• href: Specifies the URL for a link.
• src: Specifies the source file for an image.
• alt: Provides alternative text for an image.
• title:
Adds extra information about an element
(appears as a tooltip).
id: Uniquely identifies an element.
• class:
Assigns one or more class names to an
element for CSS styling.
EXAMPLES:
• href: URL of the link destination.
• target: Specifies where to open the linked
document (_blank opens in a new tab).

Self-Closing Tags
Some HTML tags do not have closing tags and are
self-contained, such as:
• <img />
• <br /> (line break)
• <hr /> (horizontal rule)

Semantic HTML
Using semantic tags enhances the readability and
accessibility of the web content.
• Examples:
• <header>: Represents the introductory
content.
• <nav>: Contains navigation links.
• <article>: Represents an independent piece of
content.
• <section>: Defines a section of content.
• <footer>:
Represents the footer of the
document or section.

Conclusion
HTML is essential for structuring and presenting
web content. Understanding basic elements and
their attributes is the first step in web
development. By learning and practicing HTML,
you can create and design your own webpages
effectively.

You might also like