The document provides an introduction to HTML and explains various HTML tags and elements. It discusses HTML tags for headings, paragraphs, links, images, attributes, horizontal rules, line breaks, preformatted text, and styles. It also covers HTML formatting elements for bold, italics, emphasis, small text, marks, deletions, subscripts, and superscripts. Finally, it demonstrates how to create multi-column layouts using <div> tags or HTML5 semantic elements like <header>, <nav>, <section>, and <footer>.
HTML is a markup language used to define the structure and layout of web pages. HTML documents contain HTML elements that define different parts of the page like headings, paragraphs, lists, links, and more. Key HTML elements include <html> <head> <body> <h1>-<h6> for headings, <p> for paragraphs, <ul> and <ol> for unordered and ordered lists, <a> for links, <img> for images, <table> for tables, and <form> for forms. HTML documents are text files that use tags enclosed in < > to define elements and attributes provide additional information about elements.
To make a picture the background of web pages:
1. Point the <body> background attribute to the image file name using <body background="picture.gif">.
2. Add the bgproperties attribute with a value of "fixed" to keep the background image from moving when scrolling: <body background="picture.gif" bgproperties="fixed">.
3. Place the <body> tag with the background attributes after the closing </head> tag to set the background image for the entire page.
EBRE TABOR UNIVERSITY Gafat Institute of Technology Department of Information...shambelworku8
EBRE TABOR UNIVERSITY
Gafat Institute of Technology
Department of Information Technology
ASSIGNMENT OF GEOGRAPGY INFORMATION
SYSTEM&REMOTSEMSING
GROUP 4 M
The document defines various HTML elements and their attributes. It discusses how HTML elements are defined with start and end tags, and can be nested within other elements. It also covers empty elements, attributes, common tags like <a>, <img>, <h1>-<h6> headings, and <pre> for preformatted text. Styles can be added to elements using the style attribute or internal/external CSS.
- HTML (Hypertext Markup Language) is the standard markup language used to create web pages. It uses tags to define headings, paragraphs, lists, links, and other elements.
- HTML documents are made up of HTML elements like <html>, <head>, <body>, <h1>, <p>, <a>, which are delimited by angle brackets. Tags usually come in pairs with an opening and closing tag.
- CSS (Cascading Style Sheets) is used to control the style and layout of multiple web pages. It can be added to HTML documents through inline styles, internal stylesheets, or external stylesheets and is used to define things like colors, fonts, spacing.
The document provides an overview of HTML (Hypertext Markup Language), which is the standard markup language used to create web pages. It describes the basic building blocks of HTML pages, including elements like <html>, <head>, <body>, <h1>-<h6> headings, <p> paragraphs, and other common tags. It also provides examples of how to structure a simple HTML page and briefly describes how HTML pages are rendered in web browsers.
HTML defines the structure and layout of a web page. It uses elements like <h1> for headings and <p> for paragraphs to structure content. CSS can be used to style HTML elements by specifying properties for things like color, font, size, and layout. JavaScript can dynamically update HTML content and attributes, adding interactivity to web pages. It is one of the core languages all web developers must learn along with HTML and CSS.
HTML defines the structure and layout of a web page. It uses elements like <h1> for headings and <p> for paragraphs to structure content. CSS can be used to style HTML elements by specifying properties for things like color, font, size, and layout. JavaScript can dynamically update HTML content and attributes, adding interactivity to web pages. It is one of the core languages all web developers must learn along with HTML and CSS.
XHTML elements are HTML elements written as XML that must follow specific syntax rules. Elements must be properly nested, in lowercase, and closed with end tags. XHTML documents require a root element and empty elements like <br> need closing slashes. Standard elements include headings, paragraphs, horizontal rules, comments and more to structure web pages.
HTML is a markup language used to define the structure and layout of web pages. HTML uses tags to mark elements like headings, paragraphs, links, images, and tables. Tags are enclosed in angle brackets and normally come in pairs with an opening and closing tag. HTML documents must include HTML, head, and body tags. The head contains meta information and the body contains visible page content. CSS can be used to style and lay out HTML elements.
- HTML (Hypertext Markup Language) is the standard markup language used to create web pages
- HTML describes the structure of a web page using elements like headings, paragraphs, links, and images
- Key HTML elements include headings (<h1>-<h6>), paragraphs (<p>), links (<a>), images (<img>), and breaks (<br>)
This document provides an introduction to HTML (Hypertext Markup Language) and covers many basic HTML elements and tags. It discusses how HTML is used to create web pages, explains common tags like <html>, <head>, <body>, and <title>. It also covers text formatting tags, font tags, image tags, links, lists, tables, and more. The document includes many code examples and screenshots to demonstrate how each tag is used.
This document provides an introduction to HTML. It defines HTML as the standard markup language for creating web pages and describes some key HTML elements and tags. It explains that HTML elements like headings, paragraphs, links and images are defined using tags enclosed in angle brackets. It also provides examples of common HTML tags and attributes used to structure and style web page content.
HTML (Hypertext Markup Language) is the standard markup language used to create web pages. Key points covered in the document include:
- HTML consists of elements that describe the structure of a web page like headings, paragraphs, links, images, etc.
- HTML documents require an opening <html> tag and closing </html> tag with the visible content between <body> and </body> tags.
- Common elements include headings <h1>-<h6>, paragraphs <p>, links <a>, images <img>, lists <ul>, <ol>, <li>, tables <table>, <tr>, <td>, <th>, and more.
- Attributes provide additional information about elements like
HTML is a markup language used to define the structure and layout of web pages. HTML uses tags to mark elements like headings, paragraphs, links, images, and tables. Some key tags include:
<h1> for main headings, <p> for paragraphs, <a> for links, <img> for images, and <table> for tables. Elements are everything between a starting and ending tag. HTML documents contain tags and plain text and are displayed in web browsers.
The document describes various HTML tags for formatting text, adding links, and including metadata in web pages. It provides examples of tags like <b> for bold text, <a> for creating links, <title> for the page title, <head> for including scripts and stylesheets, and <meta> for metadata. It also explains how tags like <link> and <style> are used to reference external stylesheets and define internal styles.
WEBSITE DEVELOPMENT,HTML is the standard markup language for creating Web pag...johnmngoya1
What is HTML?
HTML is the standard markup language for creating Web pages.
HTML stands for Hyper Text Markup Language.
HTML describes the structure of Web pages using markup.
HTML elements are the building blocks of HTML pages.
HTML elements are represented by tags.
HTML tags label pieces of content such as "heading", "paragraph",
"table", and so on.
Browsers do not display the HTML tags, but use them to render
the content of the page.
The document provides an introduction to HTML (Hypertext Markup Language) by explaining some key concepts:
HTML is used to create web pages and is made up of markup tags rather than a programming language. It describes the structure of a web page using elements like headings, paragraphs, links, images, lists and tables. The document then demonstrates and explains the use of various HTML tags through examples of code and the resulting web page output.
The document discusses HTML, the standard markup language used to define the structure of web pages. HTML uses tags to label different elements like headings, paragraphs, and links. An example HTML code snippet is provided that demonstrates the basic structure of an HTML document including the <html>, <head>, <title>, and <body> tags.
The document outlines a full stack developer course that covers HTML topics like tags, elements, attributes, forms, lists, tables, and more. It provides code examples for each HTML feature discussed, such as headings, paragraphs, line breaks, centering content, and styling text. The course lessons cover basic HTML syntax and structure, text formatting tags, links, lists, tables, and grouping and formatting content with CSS.
HTML is the standard markup language used to create web pages. Key points include:
- HTML uses elements like <h1> and <p> to define headings and paragraphs that describe the structure of a web page.
- Elements are represented by tags that begin with < and end with >.
- Attributes like href and src provide additional information about elements.
- HTML can be styled with internal or external CSS to define fonts, colors, borders and more. Common elements like <a>, <img>, <table> and <ul> are described.
Introduction to HTML: Overview and StructureJM PALEN
This topic provides an introduction to HTML (Hypertext Markup Language), the standard language used to create and structure web pages. It covers the fundamental concepts of HTML, including its role in defining the content and layout of a webpage. Students will learn about key elements such as headings, paragraphs, links, images, and lists, as well as the basic structure of an HTML document, including the <!DOCTYPE>, <html>, <head>, and <body> tags. The lesson emphasizes the importance of proper HTML syntax and structure to ensure web pages are accessible, organized, and visually effective.
Geography Sem II Unit 1C Correlation of Geography with other school subjectsProfDrShaikhImran
The correlation of school subjects refers to the interconnectedness and mutual reinforcement between different academic disciplines. This concept highlights how knowledge and skills in one subject can support, enhance, or overlap with learning in another. Recognizing these correlations helps in creating a more holistic and meaningful educational experience.
Contact Lens:::: An Overview.pptx.: OptometryMushahidRaza8
A comprehensive guide for Optometry students: understanding in easy launguage of contact lens.
Don't forget to like,share and comments if you found it useful!.
Ad
More Related Content
Similar to Web Dev Essential 1web dev using HTML DHTML.pptx (20)
- HTML (Hypertext Markup Language) is the standard markup language used to create web pages. It uses tags to define headings, paragraphs, lists, links, and other elements.
- HTML documents are made up of HTML elements like <html>, <head>, <body>, <h1>, <p>, <a>, which are delimited by angle brackets. Tags usually come in pairs with an opening and closing tag.
- CSS (Cascading Style Sheets) is used to control the style and layout of multiple web pages. It can be added to HTML documents through inline styles, internal stylesheets, or external stylesheets and is used to define things like colors, fonts, spacing.
The document provides an overview of HTML (Hypertext Markup Language), which is the standard markup language used to create web pages. It describes the basic building blocks of HTML pages, including elements like <html>, <head>, <body>, <h1>-<h6> headings, <p> paragraphs, and other common tags. It also provides examples of how to structure a simple HTML page and briefly describes how HTML pages are rendered in web browsers.
HTML defines the structure and layout of a web page. It uses elements like <h1> for headings and <p> for paragraphs to structure content. CSS can be used to style HTML elements by specifying properties for things like color, font, size, and layout. JavaScript can dynamically update HTML content and attributes, adding interactivity to web pages. It is one of the core languages all web developers must learn along with HTML and CSS.
HTML defines the structure and layout of a web page. It uses elements like <h1> for headings and <p> for paragraphs to structure content. CSS can be used to style HTML elements by specifying properties for things like color, font, size, and layout. JavaScript can dynamically update HTML content and attributes, adding interactivity to web pages. It is one of the core languages all web developers must learn along with HTML and CSS.
XHTML elements are HTML elements written as XML that must follow specific syntax rules. Elements must be properly nested, in lowercase, and closed with end tags. XHTML documents require a root element and empty elements like <br> need closing slashes. Standard elements include headings, paragraphs, horizontal rules, comments and more to structure web pages.
HTML is a markup language used to define the structure and layout of web pages. HTML uses tags to mark elements like headings, paragraphs, links, images, and tables. Tags are enclosed in angle brackets and normally come in pairs with an opening and closing tag. HTML documents must include HTML, head, and body tags. The head contains meta information and the body contains visible page content. CSS can be used to style and lay out HTML elements.
- HTML (Hypertext Markup Language) is the standard markup language used to create web pages
- HTML describes the structure of a web page using elements like headings, paragraphs, links, and images
- Key HTML elements include headings (<h1>-<h6>), paragraphs (<p>), links (<a>), images (<img>), and breaks (<br>)
This document provides an introduction to HTML (Hypertext Markup Language) and covers many basic HTML elements and tags. It discusses how HTML is used to create web pages, explains common tags like <html>, <head>, <body>, and <title>. It also covers text formatting tags, font tags, image tags, links, lists, tables, and more. The document includes many code examples and screenshots to demonstrate how each tag is used.
This document provides an introduction to HTML. It defines HTML as the standard markup language for creating web pages and describes some key HTML elements and tags. It explains that HTML elements like headings, paragraphs, links and images are defined using tags enclosed in angle brackets. It also provides examples of common HTML tags and attributes used to structure and style web page content.
HTML (Hypertext Markup Language) is the standard markup language used to create web pages. Key points covered in the document include:
- HTML consists of elements that describe the structure of a web page like headings, paragraphs, links, images, etc.
- HTML documents require an opening <html> tag and closing </html> tag with the visible content between <body> and </body> tags.
- Common elements include headings <h1>-<h6>, paragraphs <p>, links <a>, images <img>, lists <ul>, <ol>, <li>, tables <table>, <tr>, <td>, <th>, and more.
- Attributes provide additional information about elements like
HTML is a markup language used to define the structure and layout of web pages. HTML uses tags to mark elements like headings, paragraphs, links, images, and tables. Some key tags include:
<h1> for main headings, <p> for paragraphs, <a> for links, <img> for images, and <table> for tables. Elements are everything between a starting and ending tag. HTML documents contain tags and plain text and are displayed in web browsers.
The document describes various HTML tags for formatting text, adding links, and including metadata in web pages. It provides examples of tags like <b> for bold text, <a> for creating links, <title> for the page title, <head> for including scripts and stylesheets, and <meta> for metadata. It also explains how tags like <link> and <style> are used to reference external stylesheets and define internal styles.
WEBSITE DEVELOPMENT,HTML is the standard markup language for creating Web pag...johnmngoya1
What is HTML?
HTML is the standard markup language for creating Web pages.
HTML stands for Hyper Text Markup Language.
HTML describes the structure of Web pages using markup.
HTML elements are the building blocks of HTML pages.
HTML elements are represented by tags.
HTML tags label pieces of content such as "heading", "paragraph",
"table", and so on.
Browsers do not display the HTML tags, but use them to render
the content of the page.
The document provides an introduction to HTML (Hypertext Markup Language) by explaining some key concepts:
HTML is used to create web pages and is made up of markup tags rather than a programming language. It describes the structure of a web page using elements like headings, paragraphs, links, images, lists and tables. The document then demonstrates and explains the use of various HTML tags through examples of code and the resulting web page output.
The document discusses HTML, the standard markup language used to define the structure of web pages. HTML uses tags to label different elements like headings, paragraphs, and links. An example HTML code snippet is provided that demonstrates the basic structure of an HTML document including the <html>, <head>, <title>, and <body> tags.
The document outlines a full stack developer course that covers HTML topics like tags, elements, attributes, forms, lists, tables, and more. It provides code examples for each HTML feature discussed, such as headings, paragraphs, line breaks, centering content, and styling text. The course lessons cover basic HTML syntax and structure, text formatting tags, links, lists, tables, and grouping and formatting content with CSS.
HTML is the standard markup language used to create web pages. Key points include:
- HTML uses elements like <h1> and <p> to define headings and paragraphs that describe the structure of a web page.
- Elements are represented by tags that begin with < and end with >.
- Attributes like href and src provide additional information about elements.
- HTML can be styled with internal or external CSS to define fonts, colors, borders and more. Common elements like <a>, <img>, <table> and <ul> are described.
Introduction to HTML: Overview and StructureJM PALEN
This topic provides an introduction to HTML (Hypertext Markup Language), the standard language used to create and structure web pages. It covers the fundamental concepts of HTML, including its role in defining the content and layout of a webpage. Students will learn about key elements such as headings, paragraphs, links, images, and lists, as well as the basic structure of an HTML document, including the <!DOCTYPE>, <html>, <head>, and <body> tags. The lesson emphasizes the importance of proper HTML syntax and structure to ensure web pages are accessible, organized, and visually effective.
Geography Sem II Unit 1C Correlation of Geography with other school subjectsProfDrShaikhImran
The correlation of school subjects refers to the interconnectedness and mutual reinforcement between different academic disciplines. This concept highlights how knowledge and skills in one subject can support, enhance, or overlap with learning in another. Recognizing these correlations helps in creating a more holistic and meaningful educational experience.
Contact Lens:::: An Overview.pptx.: OptometryMushahidRaza8
A comprehensive guide for Optometry students: understanding in easy launguage of contact lens.
Don't forget to like,share and comments if you found it useful!.
"Basics of Heterocyclic Compounds and Their Naming Rules"rupalinirmalbpharm
This video is about heterocyclic compounds, which are chemical compounds with rings that include atoms like nitrogen, oxygen, or sulfur along with carbon. It covers:
Introduction – What heterocyclic compounds are.
Prefix for heteroatom – How to name the different non-carbon atoms in the ring.
Suffix for heterocyclic compounds – How to finish the name depending on the ring size and type.
Nomenclature rules – Simple rules for naming these compounds the right way.
Common rings – Examples of popular heterocyclic compounds used in real life.
The *nervous system of insects* is a complex network of nerve cells (neurons) and supporting cells that process and transmit information. Here's an overview:
Structure
1. *Brain*: The insect brain is a complex structure that processes sensory information, controls behavior, and integrates information.
2. *Ventral nerve cord*: A chain of ganglia (nerve clusters) that runs along the insect's body, controlling movement and sensory processing.
3. *Peripheral nervous system*: Nerves that connect the central nervous system to sensory organs and muscles.
Functions
1. *Sensory processing*: Insects can detect and respond to various stimuli, such as light, sound, touch, taste, and smell.
2. *Motor control*: The nervous system controls movement, including walking, flying, and feeding.
3. *Behavioral responThe *nervous system of insects* is a complex network of nerve cells (neurons) and supporting cells that process and transmit information. Here's an overview:
Structure
1. *Brain*: The insect brain is a complex structure that processes sensory information, controls behavior, and integrates information.
2. *Ventral nerve cord*: A chain of ganglia (nerve clusters) that runs along the insect's body, controlling movement and sensory processing.
3. *Peripheral nervous system*: Nerves that connect the central nervous system to sensory organs and muscles.
Functions
1. *Sensory processing*: Insects can detect and respond to various stimuli, such as light, sound, touch, taste, and smell.
2. *Motor control*: The nervous system controls movement, including walking, flying, and feeding.
3. *Behavioral responses*: Insects can exhibit complex behaviors, such as mating, foraging, and social interactions.
Characteristics
1. *Decentralized*: Insect nervous systems have some autonomy in different body parts.
2. *Specialized*: Different parts of the nervous system are specialized for specific functions.
3. *Efficient*: Insect nervous systems are highly efficient, allowing for rapid processing and response to stimuli.
The insect nervous system is a remarkable example of evolutionary adaptation, enabling insects to thrive in diverse environments.
The insect nervous system is a remarkable example of evolutionary adaptation, enabling insects to thrive
How to Manage Purchase Alternatives in Odoo 18Celine George
Managing purchase alternatives is crucial for ensuring a smooth and cost-effective procurement process. Odoo 18 provides robust tools to handle alternative vendors and products, enabling businesses to maintain flexibility and mitigate supply chain disruptions.
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schoolsdogden2
Algebra 1 is often described as a “gateway” class, a pivotal moment that can shape the rest of a student’s K–12 education. Early access is key: successfully completing Algebra 1 in middle school allows students to complete advanced math and science coursework in high school, which research shows lead to higher wages and lower rates of unemployment in adulthood.
Learn how The Atlanta Public Schools is using their data to create a more equitable enrollment in middle school Algebra classes.
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...larencebapu132
This is short and accurate description of World war-1 (1914-18)
It can give you the perfect factual conceptual clarity on the great war
Regards Simanchala Sarab
Student of BABed(ITEP, Secondary stage)in History at Guru Nanak Dev University Amritsar Punjab 🙏🙏
APM event hosted by the Midlands Network on 30 April 2025.
Speaker: Sacha Hind, Senior Programme Manager, Network Rail
With fierce competition in today’s job market, candidates need a lot more than a good CV and interview skills to stand out from the crowd.
Based on her own experience of progressing to a senior project role and leading a team of 35 project professionals, Sacha shared not just how to land that dream role, but how to be successful in it and most importantly, how to enjoy it!
Sacha included her top tips for aspiring leaders – the things you really need to know but people rarely tell you!
We also celebrated our Midlands Regional Network Awards 2025, and presenting the award for Midlands Student of the Year 2025.
This session provided the opportunity for personal reflection on areas attendees are currently focussing on in order to be successful versus what really makes a difference.
Sacha answered some common questions about what it takes to thrive at a senior level in a fast-paced project environment: Do I need a degree? How do I balance work with family and life outside of work? How do I get leadership experience before I become a line manager?
The session was full of practical takeaways and the audience also had the opportunity to get their questions answered on the evening with a live Q&A session.
Attendees hopefully came away feeling more confident, motivated and empowered to progress their careers
How to Manage Opening & Closing Controls in Odoo 17 POSCeline George
In Odoo 17 Point of Sale, the opening and closing controls are key for cash management. At the start of a shift, cashiers log in and enter the starting cash amount, marking the beginning of financial tracking. Throughout the shift, every transaction is recorded, creating an audit trail.
This presentation was provided by Bill Kasdorf of Kasdorf & Associates LLC and Publishing Technology Partners, during the fifth session of the NISO training series "Accessibility Essentials." Session Five: A Standards Seminar, was held May 1, 2025.
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingCeline George
The Accounting module in Odoo 17 is a complete tool designed to manage all financial aspects of a business. Odoo offers a comprehensive set of tools for generating financial and tax reports, which are crucial for managing a company's finances and ensuring compliance with tax regulations.
2. HTML Introduction
• HTML is the standard markup language for creating Web pages.
• What is HTML?
HTML stands for Hyper Text Markup Language
HTML is the standard markup language for creating Web pages
HTML describes the structure of a Web page
HTML consists of a series of elements
HTML elements tell the browser how to display the content
HTML elements label pieces of content such as "this is a heading", "this is a
paragraph", "this is a link", etc.
4. HTML Elements
• An HTML element is defined by a start tag, some content, and an end
tag.
• The HTML element is everything from the start tag to the end tag:
• <tagname>Content goes here...</tagname>
• Examples of some HTML elements:
• <h1>My First Heading</h1>
• <p>My first paragraph.</p>
5. HTML Attributes
• HTML attributes provide additional information about HTML
elements.
• HTML Attributes
All HTML elements can have attributes
Attributes provide additional information about elements
Attributes are always specified in the start tag
Attributes usually come in name/value pairs like: name="value"
• The href Attribute
The <a> tag defines a hyperlink. The href attribute specifies the URL of the page the link goes to:
<a href="https://www.gcmsmansehra.com">Visit GCMS
Mansehra</a>
<img src=“abc.jpg">
7. HTML Paragraphs
• A paragraph always starts on a new line, and browsers automatically
add some white space (a margin) before and after a paragraph.
<!DOCTYPE html>
<html>
<body>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
</body>
</html>
8. HTML Horizontal Rules
The <hr> tag defines a thematic break in an HTML page, and is most often displayed as a horizontal rule.
The <hr> element is used to separate content (or define a change) in an HTML page:
<!DOCTYPE html>
<html>
<body>
<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>
<h2>This is heading 2</h2>
<p>This is some other text.</p>
</body>
</html>
9. HTML Line Breaks
The HTML <br> element defines a line break.
Use <br> if you want a line break (a new line) without starting a new paragraph:
<!DOCTYPE html>
<html>
<body>
<p>This is<br>a paragraph<br>with line breaks.</p>
</body>
</html>
10. The Poem Problem
• This poem will display on a single line: <!DOCTYPE html>
<html>
<body>
<p>In HTML, spaces and new lines are ignored:</p>
<p>
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.
</p>
</body>
</html>
11. Solution- The HTML <pre> Element
The HTML <pre> element defines preformatted text.
The text inside a <pre> element is displayed in a fixed-width font (usually Courier),
and it preserves both spaces and line breaks:
<!DOCTYPE html>
<html>
<body>
<p>The pre tag preserves both spaces and line breaks:</p>
<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>
</body>
</html>
12. HTML Styles
The HTML style attribute is used to add styles to an element, such as color, font, size, and more.
<!DOCTYPE html>
<html>
<body>
<p>I am normal</p>
<p style="color:red;">I am red</p>
<p style="color:blue;">I am blue</p>
<p style="font-size:50px;">I am big</p>
</body>
</html>
<tagname style="property:value;">
13. HTML Styles
<body style="background-color:powderblue;">
Text Color
The CSS color property defines the text color for an HTML element:
<h1 style="color:blue;">This is a heading</h1>
<p style="color:red;">This is a paragraph.</p>
Fonts
The CSS font-family property defines the font to be used for an HTML element:
<h1 style="font-family:verdana;">This is a heading</h1>
<p style="font-family:courier;">This is a paragraph.</p>
Text Size
The CSS font-size property defines the text size for an HTML element:
<p style="font-size:160%;">This is a paragraph.</p>
14. Cont…
Text Alignment
The CSS text-align property defines the horizontal text alignment for an HTML element:
<!DOCTYPE html>
<html>
<body>
<h1 style="text-align:center;">Centered Heading</h1>
<p style="text-align:center;">Centered paragraph.</p>
</body>
</html>
15. HTML Text Formatting
HTML Formatting Elements
Formatting elements were designed to display special types of text:
•<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
<b>This text is bold</b>
<strong>This text is important!</strong>
<i>This text is italic</i>
<small>This is some smaller text.</small>
<p>Do not forget to buy <mark>milk</mark> today.</p>
<p>My favorite color is <del>blue</del> red.</p>
<p>My favorite color
is <del>blue</del> <ins>red</ins>.</p>
<p>This is <sub>subscripted</sub> text.</p>
<p>This is <sup>superscripted</sup> text.</p>
<em>This text is emphasized</em>
16. HTML Block and Inline Elements
Every HTML element has a default display value, depending on what type of element it is.
The two most common display values are block and inline.
block-level element always starts on a new line, and the browsers automatically add some space (a margin) before and after the element.
A block-level element always takes up the full width available (stretches out to the left and right as far as it can).
Two commonly used block elements are: <p> and <div>.
The <p> element defines a paragraph in an HTML document.
The <div> element defines a division or a section in an HTML document.
<!DOCTYPE html>
<html>
<body>
<p style="border: 1px solid black">Hello World</p>
<div style="border: 1px solid black">Hello World</div>
<p>The P and the DIV elements are both block elements, and
they will always start on a new line and take up the full width
available (stretches out to the left and right as far as it
can).</p>
</body>
</html>
17. Inline Elements
An inline element does not start on a new line.
An inline element only takes up as much width as
necessary.
This is a <span> element inside a paragraph. <!DOCTYPE html>
<html>
<body>
<p>This is an inline span <span style="border: 1px solid
black">Hello World</span> element inside a paragraph.</p>
<p>The SPAN element is an inline element, and will not start o
a new line and only takes up as much width as necessary.</p>
</body>
</html>
18. The <div> Element
The <div> element is often used as a container for other HTML elements.
The <div> element has no required attributes, but style, class and id are common.
<!DOCTYPE html>
<html>
<body>
<div style="background-
color:black;color:white;padding:20px;">
<h2>London</h2>
<p>London is the capital city of England. It is the most
populous city in the United Kingdom, with a metropolitan area
of over 13 million inhabitants.</p>
<p>Standing on the River Thames, London has been a major
settlement for two millennia, its history going back to its
founding by the Romans, who named it Londinium.</p>
</div>
</body>
</html>
19. The <span> Element
The <span> element is an inline container used to mark up a part of a text, or a part of a document.
The <span> element has no required attributes, but style, class and id are common.
<!DOCTYPE html>
<html>
<body>
<h1>The span element</h1>
<p>My mother has <span style="color:blue;font-
weight:bold;">blue</span> eyes and my father has <span
style="color:darkolivegreen;font-weight:bold;">dark
green</span> eyes.</p>
</body>
</html>
21. Background Color
<!DOCTYPE html>
<html>
<body>
<h1 style="background-color:DodgerBlue;">Hello World</h1>
<p style="background-color:Tomato;">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
diam nonummy nibh euismod tincidunt ut laoreet dolore
magna aliquam erat volutpat.
Ut wisi enim ad minim veniam, quis nostrud exerci tation
ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo
consequat.
</p>
</body>
</html>
22. Text Color
<!DOCTYPE html>
<html>
<body>
<h3 style="color:Tomato;">Hello World</h3>
<p style="color:DodgerBlue;">Lorem ipsum dolor sit amet,
consectetuer adipiscing elit, sed diam nonummy nibh euismod
tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
<p style="color:MediumSeaGreen;">Ut wisi enim ad minim
veniam, quis nostrud exerci tation ullamcorper suscipit lobortis
nisl ut aliquip ex ea commodo consequat.</p>
</body>
</html>
24. Color Values <!DOCTYPE html>
<html>
<body>
<p>Same as color name "Tomato":</p>
<h1 style="background-color:rgb(255, 99, 71);">rgb(255, 99,
71)</h1>
<h1 style="background-color:#ff6347;">#ff6347</h1>
<h1 style="background-color:hsl(9, 100%, 64%);">hsl(9, 100%,
64%)</h1>
<p>Same as color name "Tomato", but 50% transparent:</p>
<h1 style="background-color:rgba(255, 99, 71, 0.5);">rgba(255,
99, 71, 0.5)</h1>
<h1 style="background-color:hsla(9, 100%, 64%, 0.5);">hsla(9,
100%, 64%, 0.5)</h1>
<p>In addition to the predefined color names, colors can be
specified using RGB, HEX, HSL, or even transparent colors using
RGBA or HSLA color values.</p>
</body>
</html>
25. <!DOCTYPE html>
<html>
<body>
<h1>Multiple DIV Elements</h1>
<div style="background-color:#FFF4A3;">
<h2>London</h2>
<p>London is the capital city of England.</p>
<p>London has over 13 million inhabitants.</p>
</div>
<div style="background-color:#FFC0C7;">
<h2>Oslo</h2>
<p>Oslo is the capital city of Norway.</p>
<p>Oslo has over 600.000 inhabitants.</p>
</div>
<div style="background-color:#D9EEE1;">
<h2>Rome</h2>
<p>Rome is the capital city of Italy.</p>
<p>Rome has almost 3 million inhabitants.</p>
</div>
<p>CSS styles are added to make it easier to separate the divs,
and to make them more pretty:)</p>
</body>
</html>
26. <body>
<h1>Flexbox Example</h1>
<p>Align three DIV elements side by side.</p>
<div class="mycontainer">
<div style="background-color:#FFF4A3;">
<h2>London</h2>
<p>London is the capital city of England.</p>
<p>London has over 13 million inhabitants.</p>
</div>
<div style="background-color:#FFC0C7;">
<h2>Oslo</h2>
<p>Oslo is the capital city of Norway.</p>
<p>Oslo has over 600.000 inhabitants.</p>
</div>
<div style="background-color:#D9EEE1;">
<h2>Rome</h2>
<p>Rome is the capital city of Italy.</p>
<p>Rome has almost 3 million.</p>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<style>
.mycontainer {
display: flex;
}
.mycontainer > div {
width:33%;
}
</style>
</head>
27. Multiple Classes
Here, all three h2 elements belongs to the "city" class. In addition, London also belongs to the "main" class, which
center-aligns the text.
<!DOCTYPE html>
<html>
<head>
<style>
.city {
background-color: tomato;
color: white;
padding: 10px;
}
.main {
text-align: center;
}
</style>
</head>
<body>
<h2>Multiple Classes</h2>
<p>Here, all three h2 elements belongs to the "city" class. In
addition, London also belongs to the "main" class, which
center-aligns the text.</p>
<h2 class="city main">London</h2>
<h2 class="city">Paris</h2>
<h2 class="city">Tokyo</h2>
</body>
</html>
28. HTML id Attribute
The id attribute specifies a unique id for an HTML element. The value of the id attribute must be unique within the HTML
document.
The id attribute is used to point to a specific style declaration in a style sheet. It is also used by JavaScript to access and
manipulate the element with the specific id.
The syntax for id is: write a hash character (#), followed by an id name. Then, define the CSS properties within curly braces
{}.
<!DOCTYPE html>
<html>
<head>
<style>
#myHeader {
background-color: lightblue;
color: black;
padding: 40px;
text-align: center;
}
</style>
</head>
<body>
<h2>The id Attribute</h2>
<p>Use CSS to style an element with the id "myHeader":</p>
<h1 id="myHeader">My Header</h1>
</body>
</html>
29. Difference Between Class and ID
A class name can be used by multiple HTML elements, while an id name must only be used by one HTML element
within the page:
<!DOCTYPE html>
<html>
<head>
<style>
/* Style the element with the id "myHeader" */
#myHeader {
background-color: lightblue;
color: black;
padding: 40px;
text-align: center;
}
/* Style all elements with the class name "city" */
.city {
background-color: tomato;
color: white;
padding: 10px;
}
</style>
</head>
<body>
<h2>Difference Between Class and ID</h2>
<p>A class name can be used by multiple HTML elements, while an id
name must only be used by one HTML element within the page:</p>
<!-- An element with a unique id -->
<h1 id="myHeader">My Cities</h1>
<!-- Multiple elements with same class -->
<h2 class="city">London</h2>
<p>London is the capital of England.</p>
<h2 class="city">Paris</h2>
<p>Paris is the capital of France.</p>
<h2 class="city">Tokyo</h2>
<p>Tokyo is the capital of Japan.</p>
</body>
</html>
31. HTML Forms
An HTML form is used to collect user input. The user input is most often sent to a server for
processing.
<!DOCTYPE html>
<html>
<body>
<h2>HTML Forms</h2>
<form action="/action_page.php">
<label for="fname">First name:</label><br>
<input type="text" id="fname" name="fname"
value="John"><br>
<label for="lname">Last name:</label><br>
<input type="text" id="lname" name="lname"
value="Doe"><br><br>
<input type="submit" value="Submit">
</form>
<p>If you click the "Submit" button, the form-data will be sent
to a page called "/action_page.php".</p>
</body>
</html>
32. The <form> Element
The HTML <form> element is used to create an HTML form for user input:
<form>
.
form elements
.
</form>
33. The <input> Element
Type Description
<input type="text"> Displays a single-line text input field
<input type="radio"> Displays a radio button (for selecting one
of many choices)
<input type="checkbox"> Displays a checkbox (for selecting zero or
more of many choices)
<input type="submit"> Displays a submit button (for submitting
the form)
<input type="button"> Displays a clickable button
34. Text Fields
The <input type="text"> defines a single-line input field for text input.
<!DOCTYPE html>
<html>
<body>
<h2>Text input fields</h2>
<form>
<label for="fname">First name:</label><br>
<input type="text" id="fname" name="fname"
value="John"><br>
<label for="lname">Last name:</label><br>
<input type="text" id="lname" name="lname" value="Doe">
</form>
<p>Note that the form itself is not visible.</p>
<p>Also note that the default width of text input fields is 20
characters.</p>
</body>
</html>
39. The <fieldset> and <legend> Elements
<!DOCTYPE html>
<html>
<body>
<h2>Grouping Form Data with Fieldset</h2>
<p>The fieldset element is used to group related data in a form,
and the legend element defines a caption for the fieldset
element.</p>
<form action="/action_page.php">
<fieldset>
<legend>Personalia:</legend>
<label for="fname">First name:</label><br>
<input type="text" id="fname" name="fname"
value="John"><br>
<label for="lname">Last name:</label><br>
<input type="text" id="lname" name="lname"
value="Doe"><br><br>
<input type="submit" value="Submit">
</fieldset>
</form>