Introduction to HTML Basics
Introduction to HTML Basics
A
Mini Project Report
On
“PYTHON”
BACHELOR OF TECHNOLOGY
in
Submitted by
Supriya Singh
(Roll No.22001200100178
Under Guidance of
Submitted To
Mr. Harendra Gupta
SESSION: 2023-24
[2]
Vision & Mission of the Department
Rubrics are tagged with course outcomes for the laboratory performance.
[3]
PO
Rubric
CO Statements MAPPI
s
NG
Students will be able to work effectively in individual and PO9,
1 C211.1
team to manage the projects. PO11
Apply written and verbal communication through report
2 C211.2 PO10
and presentation.
Apply the fundamental principles of engineering into
PO1,
3 C211.3 development of technology and able to develop work ethics
PO8
in industry.
[4]
Evalution
[5]
CERTIFICATE
[6]
DECLARATION
This is certified that the work which is being presented in the mini project entitled
“PYTHON” is submitted in the department of Computer Science and Engineering of
Institute of Technology and Management, Gida, Gorakhpur is an authentic record of my
own work carried out during the semester under the supervision of “INDUSTRIAL
INTERNSHIP TRAINING AT Neema Webtech Pvt. Ltd.
The matter presented in this mini project has not been submitted by me for the award of any
other degree of this or any other institute/university.
XYZ
This is to certify that the above statement made by the candidate is correct to the best of my
knowledge.
[7]
ABSTRACT
Counterfeit money has always existed an issue that has caused many problems in the market.
Technological growth development has made it possible to create extra counterfeit items
which are distributed in the mitigation market the global economy. Bangui existing banking
equipment and so on trading sites to check the authenticity of funds. But the average person
does not do that have access to such systems and that is why they are needed in order for the
software to receive counterfeit money, which can be used by ordinary people. This proposed
system uses image processing to find out if the money is real or fake. System built uses the
Python system completely language. It contains similar steps grayscale modification, edge
detection, separation, etc. made using appropriate methods. Keyword: Counterfeit currency,
Image Processing, Python programming language, grayscale conversion, edge detection,
segmentation.
[8]
ACKNOWLEDGEMENT
I am sincerely thankful to Mr. Ashutosh Rao (HOD) & Mr. Shailesh Patel (Mini Project
Coordinator) for his support. I express my gratitude and thanks to all the faculties and staff
members of Computer Science & Engineering department for their sincere cooperation in
furnishing relevant information to complete this mini project report well in time successfully.
Finally, my greatest debt is to my parents, my family for their enduring love, support and
forbearance during my project work.
Supriya Singh
Roll No.2201200100178
[9]
Table of Contents
1. Introduction
2. Foundations of Python
8. Conclusion
9. References
[10]
CHAPTER 1
INTRODUCTION TO HTML
(1.1)Introduction to HTML:-
HTML, or HyperText Markup Language, is a standard markup language used to
create and structure content on the web. It employs a tag-based syntax to define the
elements within a document, indicating their roles and relationships. Each HTML
document starts with an obligatory <!DOCTYPE html> declaration, followed by an
<html> tag serving as the root element. The document is typically divided into two
main sections: the <head> and the <body>.
The <head> section contains meta-information about the document, such as the title
displayed in the browser tab (<title>), links to external resources like stylesheets and
scripts, and other essential elements. Meanwhile, the <body> section encapsulates the
main content of the page, including text, images, links, forms, and multimedia.
HTML elements are represented by tags, which come in pairs—a start tag (e.g., <p>)
and an end tag (e.g., </p>). Some elements, like line breaks (<br>) or images (<img>),
are self-closing and don't require an end tag. Attributes within tags provide additional
information or modify the behavior of elements.
The strength of HTML lies in its simplicity and flexibility. It acts as the foundation for
web development, allowing developers to create structured and semantically
meaningful documents. When combined with Cascading Style Sheets (CSS) for
styling and JavaScript for interactivity, HTML forms the cornerstone of building
dynamic and visually appealing websites across the internet.
[11]
In 1990, Tim Berners-Lee wrote the first web browser, called "WorldWideWeb" (later
renamed Nexus), and developed the first web server. He needed a way to format and link
documents, leading to the creation of HTML. The original HTML specification was a simple
markup language that allowed the identification of headers, paragraphs, lists, and links within
documents.
HTML provided a way to create structured documents with hyperlinks, enabling users to
navigate between interconnected pages. Tim Berners-Lee's vision extended beyond just
creating a web of documents; he aimed to make it a collaborative platform where people
could share and collaborate globally.
The development of HTML was a collaborative effort, with contributions from others at
CERN and the broader internet community. As the web grew, the World Wide Web
Consortium (W3C) was founded in 1994 to standardize and evolve HTML. This
collaborative approach ensured that HTML became a foundational technology for the World
Wide Web, shaping the way information is shared, accessed, and presented on the internet.
Tim Berners-Lee's pioneering work laid the groundwork for the digital revolution that
transformed communication, information sharing, and collaboration worldwide.
The evolution of HTML (HyperText Markup Language) has been a journey of continuous
development, introducing new features and capabilities to meet the growing demands of web
development. Here's a brief overview of HTML's evolution:
1. *HTML 1.0 (1991):* The first version introduced basic structure and linking capabilities.
It included elements like headings, paragraphs, lists, and anchors.
2. *HTML 2.0 (1995):* This version, standardized by the Internet Engineering Task Force
(IETF), brought improvements, including support for tables and forms.
3. *HTML 3.2 (1997):* Developed by the World Wide Web Consortium (W3C), HTML 3.2
added more features like applets, text flow around images, and support for scripting.
[12]
4. *HTML 4.0 (1997-1998):* HTML 4.0 introduced significant changes, including the
adoption of Cascading Style Sheets (CSS) for styling. It also introduced scripting support and
frames for page layout.
8. *Web Components and Modern APIs:* HTML continues to adapt to modern web
development needs. Web Components, a set of web platform APIs, allows for the creation of
reusable custom elements. New APIs, such as the Web Speech API and WebXR API, enhance
the possibilities for creating engaging and immersive web experiences.
HTML's evolution reflects the dynamic nature of the web, addressing the demands of an
ever-changing digital landscape and providing developers with the tools needed to create
more interactive, accessible, and feature-rich websites.
[13]
2. Cross-Platform Compatibility: HTML is a platform-independent language,
ensuring that web content can be accessed and displayed consistently across
different devices and browsers. This cross-platform compatibility is essential for
a seamless user experience.
3. Foundation for Web Development: HTML serves as the backbone for web
development. It works in conjunction with other web technologies like CSS
(Cascading Style Sheets) for styling and JavaScript for interactivity. Together,
they form the core technologies for creating dynamic and visually appealing
websites.
5. Responsive Web Design: With the rise of mobile devices, responsive web
design has become crucial. HTML, in combination with CSS and JavaScript,
enables developers to create websites that adapt to different screen sizes,
ensuring a consistent and user-friendly experience across various devices.
[14]
In summary, HTML is the foundation of web development, providing the
structure and semantics necessary for creating accessible, responsive, and
visually engaging websites on the modern computer and mobile landscape.
CHAPTER 2
FOUNDATIONS OF HTML
2.1 TAGS:-
In HTML (Hypertext Markup Language), TAGS serve as fundamental building
blocks for defining the structure and formatting of content within a web
document. These tags are encapsulated within angle brackets, typically forming
pairs with an opening tag and, in most cases, a corresponding closing tag. The
opening tag signifies the beginning of an element, while the closing tag,
prefixed with a forward slash, marks its end. HTML tags establish a hierarchical
structure by nesting within each other, creating parent-child relationships and
contributing to the overall organization of content. Tags can include attributes,
providing additional information or modifying the behavior of the associated
element. HTML tags are case-insensitive, and while they generally ignore extra
spaces and line breaks for readability, proper syntax and nesting are crucial for
well-formed HTML. The evolution of HTML has introduced semantic tags,
enhancing the meaning and clarity of content, and different versions of HTML
have brought about new elements and attributes to keep up with evolving web
standards. Understanding and effectively utilizing HTML tags are fundamental
skills for web developers, enabling them to create well-structured, semantically
meaningful, and visually appealing web pages.
3. Heading Tags:
- <h1> to <h6>: Define headings of varying levels, with <h1> being the highest importance.
4. List Tags:
- <ul>: Defines an unordered list.
- <ol>: Defines an ordered list.
- <li>: Represents a list item within <ul> or <ol>.
5. Link Tags:
- <a>: Creates hyperlinks.
- <link>: Defines external resources such as stylesheets.
6. Image Tag:
- <img>: Embeds images.
- Attributes like src specify the image file, and alt provides alternative text.
7. Table Tags:
- <table>: Creates a table.
- <tr>: Defines a table row.
- <td>: Represents a table cell.
- <th>: Defines a header cell in a table.
8. Form Tags:
[16]
- <form>: Wraps form elements.
- <input>: Represents various form controls (text, checkbox, radio, etc.).
- <select>: Creates a dropdown list.
- <textarea>: Defines a multiline text input.
2.2 ATTRIBUTES:-
- HTML attributes provide additional information about HTML elements and modify their
behavior. Attributes are included within the opening tag and consist of name-value pairs.
2. Syntax:
- Attributes are added to the opening tag and usually take the form attribute="value". For
example, <a href="[Link] where href is the attribute.
3. Global Attributes:
- Some attributes are applicable to most HTML elements. Examples include class for
styling, id for unique identification, and style for inline CSS.
[17]
4. Event Attributes:
- HTML allows event attributes like onclick or onchange to trigger JavaScript functions in
response to user actions.
5. Common Attributes:
- <src>: Specifies the source URL, commonly used with <img> and <script>.
- <alt>: Provides alternative text for elements like images (<img>).
6. Hyperlink Attributes:
- <href>: Specifies the URL for hyperlinks (<a>).
- <target>: Determines where the linked content will be displayed (e.g., _blank for a new
tab).
7. Form Attributes:
- <action>: Specifies the URL where form data should be sent.
- <method>: Defines the HTTP method for form submission (e.g., GET or POST).
8. Input Attributes:
- <type>: Specifies the type of input element (e.g., text, checkbox, radio).
- <name>: Assigns a name to the input field for form submission.
[18]
12. Accessibility Attributes:
- aria-* attributes: Enhance accessibility by providing information for screen readers (e.g.,
aria-label, aria-describedby).
Understanding and effectively using HTML attributes is crucial for customizing the behavior
and appearance of web elements, as well as ensuring accessibility and proper
form submission.
[19]
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
6. Linking to Files:
- The <a> tag can link to various types of files, such as PDFs, documents, or images.
- *Example:*
html
<a href="documents/[Link]" download>Download PDF</a>
Understanding these concepts allows web developers to create effective navigation structures
and implement various types of links within HTML documents.
3. *Head Section:*
- <head>: Contains meta-information, links to external resources, and scripts.
- <meta charset="UTF-8">: Defines character encoding.
- <meta name="viewport" content="width=device-width, initial-scale=1.0">: Configures
viewport for responsive design.
- <title>: Sets the title of the document, displayed in the browser tab.
- <link>: Links to external stylesheets or other resources.
- <script>: Embeds or links to JavaScript code.
4. *Body Section:*
- <body>: Encloses the main content of the document.
- Content can include headings (<h1> to <h6>), paragraphs (<p>), lists (<ul>, <ol>, <li>),
images (<img>), links (<a>), and more.
- Structural elements like <header>, <footer>, <nav>, <article>, <section>, and <aside>
provide semantic meaning to different parts of the content.
6. *Comments:*
- <!-- Comment here -->: Allows developers to add comments within the HTML code for
documentation or clarification.
[22]
The structured layout of an HTML document is essential for browsers to interpret and render
content correctly. This hierarchy, with its various elements and sections, provides a
framework for creating well-organized, semantically meaningful, and visually appealing web
pages. Understanding the HTML document structure is fundamental for web developers to
craft effective and standards-compliant websites.
CHAPTER 3
ADVANCED HTML CONCEPTS
HTML5 is the fifth version of Hypertext Markup Language, the standard language for
creating and structuring content on the World Wide Web. Introduced in 2014, HTML5
brought a range of new features, capabilities, and improvements to enhance web development.
Here's an in-depth look at HTML5:
1. *Semantic Elements:*
- HTML5 introduced a set of semantic elements to provide more meaningful structure to
web content. Examples include <header>, <footer>, <nav>, <article>, <section>, and <aside>.
These elements help define the purpose and relationships of different sections within a
webpage.
2. *Multimedia Support:*
- Native support for embedding audio and video content using the <audio> and <video>
tags. This eliminates the need for third-party plugins like Flash for multimedia playback.
4. *Form Enhancements:*
- New input types and attributes for forms, including <input type="email">, <input
type="url">, <input type="tel">, and more, facilitating input validation. The <datalist>
element provides a list of predefined options for input elements.
5. *Local Storage:*
- The localStorage and sessionStorage APIs enable web applications to store data locally on
the user's device. This allows for persistent data storage and retrieval without relying on
server-side solutions.
[23]
6. *Offline Web Applications:*
- HTML5 introduces the Application Cache (manifest attribute) and the Service Workers
API, enabling developers to create offline-capable web applications. Users can access certain
content even without an internet connection.
7. *Geolocation API:*
- The Geolocation API allows websites to access the user's location, enabling the
development of location-aware applications.
8. *WebSockets:*
- The WebSocket protocol provides full-duplex communication channels over a single,
long-lived connection, facilitating real-time data exchange between the client and server.
9. *Web Storage:*
- Besides local storage, HTML5 introduced the sessionStorage API, providing a way to
store session-specific data on the client-side.
HTML5 has become a cornerstone for modern web development, providing developers with
powerful tools to create interactive, multimedia-rich, and responsive web applications. Its
ongoing adoption and support by major browsers make it a key technology in shaping
the web landscape.
[24]
CHAPTER 4
INTRODUCTION OF CSS FOR HTML
1. *Separation of Concerns:*
- *Purpose:* CSS allows a clear separation of content (HTML) and presentation (styling).
This separation enhances maintainability and makes it easier to update or modify the visual
aspects of a webpage without altering its structure.
[25]
3. *Responsive Design:*
- *Purpose:* CSS plays a pivotal role in responsive web design, enabling layouts that adapt
to different screen sizes and devices.
- *Importance:* With the increasing diversity of devices, responsive design ensures optimal
user experiences across desktops, tablets, and smartphones.
4. *Efficient Updates:*
- *Purpose:* Centralizing styles in CSS allows developers to make global changes
efficiently. Updates to styles are applied universally, reducing redundancy in code.
- *Importance:* This efficiency streamlines development and maintenance processes,
saving time and effort.
5. *Accessibility:*
- *Purpose:* CSS supports the creation of accessible designs by allowing developers to
control font sizes, colors, and other visual elements.
- *Importance:* Accessible designs accommodate users with disabilities, promoting
inclusivity and compliance with web accessibility standards.
8. *Print-Friendly Styles:*
- *Purpose:* CSS allows the definition of print styles, ensuring that web pages are
formatted appropriately when printed.
- *Importance:* Print-friendly styles contribute to a seamless transition between digital and
physical documents.
[26]
9. *Dynamic and Interactive Elements:*
- *Purpose:* CSS supports transitions and animations, enhancing the interactivity and
dynamism of web pages.
- *Importance:* Engaging and interactive elements contribute to a more enjoyable user
experience.
In summary, CSS serves the crucial purpose of styling web documents and is integral to
achieving a visually pleasing, consistent, and accessible web experience across diverse
devices and platforms.
CHAPTER 5
HTML 5 FEATURES
1. *Selectors:*
- *Definition:* Selectors target HTML elements to apply styles.
- *Example:* p selects all paragraphs, .class selects elements with a specific class, #id
selects elements with a specific ID.
2. *Properties:*
- *Definition:* Properties define the visual attributes of selected elements.
- *Example:* color, font-size, margin, padding.
3. *Values:*
- *Definition:* Values set the specific style for a property.
- *Example:* red for color, 16px for font size, 10px 20px for margin.
[27]
4. *Style Rules:*
- *Definition:* A style rule consists of a selector and a declaration block containing one or
more property-value pairs.
- *Example:*
css
p{
color: blue;
font-size: 16px;
}
5. *Cascading Order:*
- *Definition:* The order of importance for styles. Inline styles > Internal (in <style> tag) >
External (linked CSS file). Specificity and order also play a role.
- *Example:* Inline style <p style="color: red;">.
6. *Box Model:*
- *Definition:* Describes the layout of elements, including content, padding, border, and
margin.
- *Example:*
css
div {
width: 200px;
padding: 20px;
border: 2px solid black;
margin: 10px;Certainly, let's delve into more in-depth points about HTML5 features:
1. *History API:*
- The History API in HTML5 allows developers to manipulate the browser's session
history using JavaScript. This is essential for creating smooth, dynamic web applications
without full page reloads.
3. *Outline Algorithm:*
- HTML5 defines a more sophisticated outline algorithm for document structure. This
helps screen readers and other assistive technologies better understand and present the
hierarchical structure of a page.
4. *Meter Element:*
- The <meter> element is introduced to represent scalar measurements within a known
range. It is commonly used for gauges and progress bars.
7. *Command API:*
- The <command> element and associated JavaScript API provide a way to define
commands that users can invoke, enhancing the possibilities for custom context menus and
toolbars.
[29]
10. *ContentEditable Attribute:*
- The contenteditable attribute allows developers to make elements editable by users. This
is commonly used in web applications where users can interact with and modify the content
directly.
15. *IndexedDB:*
- IndexedDB is a low-level API for client-side storage of significant amounts of structured
data. It provides a way to store and retrieve data on the client-side, supporting offline
capabilities in web applications.
These additional features highlight the diverse and comprehensive improvements that
HTML5 brings to web development, addressing various aspects from multimedia and forms
to accessibility and internationalization.
CHAPTER 6
BEST PRACTICES AND TIPS
Certainly, let's explore HTML best practices in even more depth with additional points:
[32]
- Place script tags at the end of the HTML document or utilize the async or defer attributes.
This ensures scripts don't block rendering, improving page load speed.
[33]
107. *Resource Preloading:*
- Utilize resource preloading for critical assets using <link rel="preload"> to improve page
performance by fetching resources in advance.
[34]
116. **Semantic Use of <blockquote>:**
- Use the <blockquote> element for quoting text from external sources. Include the source
within a <footer> element for proper attribution.
CHAPTER 7
CONCLUSION
[35]
7.1.1 Python Program to Print Hello world!
print('Hello, world!')
OUTPUT:
Hello, world!
num1 = 1.5
num2 = 6.3
OUTPUT:
a=5
b=6
c=7
OUTPUT:
x=5
y = 10
OUTPUT:
[37]
7.1.5 Python Program to Check if a Number is Odd or Even
OUTPUT:
Enter a number: 43
43 is Odd
year = 2000
# if not divided by both 400 (century year) and 4 (not century year)
# year is not leap year
else:
print("{0} is not a leap year".format(year))
[38]
OUTPUT:
OUTPUT:
[39]
3
5
8
X = [[12,7,3],
[4 ,5,6],
[7 ,8,9]]
Y = [[5,8,1],
[6,7,3],
[4,5,9]]
result = [[0,0,0],
[0,0,0],
[0,0,0]]
for r in result:
print(r)
OUTPUT:
[17, 15, 4]
[10, 12, 9]
[11, 13, 18]
[40]
CONCLUSION
In conclusion, Python is an incredibly versatile and powerful programming language that has
gained immense popularity and widespread adoption across various domains. Its simplicity,
readability, and extensive ecosystem of libraries and frameworks make it well-suited for a
wide range of applications, including:
- Data Science: Python's rich ecosystem of libraries such as NumPy, Pandas, Matplotlib, and
Scikit-learn make it a go-to choose for data manipulation, analysis, visualization, and
machine learning.
- Web Development: Python web frameworks like Django, Flask, and Fast API enable
developers to build scalable, secure, and efficient web applications and APIs with ease.
- Automation: Python's simplicity and extensive standard library make it ideal for automating
repetitive tasks, scripting, and system administration across various domains.
- Industry Applications: Python is widely used across industries for developing custom
software solutions, tools, and applications tailored to specific needs, from finance and
healthcare to aerospace and gaming.
Python's strengths lie in its readability, simplicity, and flexibility, allowing developers to
quickly prototype ideas, write clean and maintainable code, and solve complex problems
efficiently. Whether you're a beginner learning to code or an experienced developer working
on large-scale projects, Python offers the tools and resources needed to succeed.
Overall, Python's vibrant community, extensive documentation, and robust ecosystem make it
a top choice for developers worldwide, driving innovation and powering solutions in diverse
fields and industries.
[41]
REFERENCES
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[42]
[43]