SlideShare a Scribd company logo
HTML Tags
ICE 4145: Internet and Web Programming
Bangladesh Army University of Engineering and Technology (BAUET)
Qadirabad Cantonment, Natore.
Prepared By
Mehedi Hasan Imran
Lecturer, BAUET
Dept. of ICE
Email: imran02@bauet.ac.bd
Department of Information and Communication Engineering (ICE)
Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering
4/19/2024 2
Course Outcome (CO) & mapping
Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering
What is HTML?
4/19/2024 3
 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.
Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering
4/19/2024 4
HTML Page Structure
Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering
A Simple HTML Document
4/19/2024 5
<!DOCTYPE html>
<html>
<head>
<title>ICE</title>
</head>
<body>
<h1>Information and Communication Engineering</h1>
<p>BAUET</p>
</body>
</html>
Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering
4/19/2024 6
•The <!DOCTYPE html> declaration defines that this document is an HTML5 document
•The <html> element is the root element of an HTML page
•The <head> element contains meta information about the HTML page
•The <title> element specifies a title for the HTML page (which is shown in the browser's title bar or in the
page's tab)
•The <body> element defines the document's body, and is a container for all the visible contents, such as
headings, paragraphs, images, hyperlinks, tables, lists, etc.
•The <h1> element defines a large heading
•The <p> element defines a paragraph
•Element consists of three part 1. Start tag 2. End Tag and 3. Content
•Element can be nested <p> This is a <b>man<b> <p>.
A Simple HTML Document
Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering
What is an HTML Element?
4/19/2024 7
An HTML element is defined by a start tag, some content, and an end tag:
<tagname> Content goes here... </tagname>
The HTML element is everything from the start tag to the end tag:
<h1>My First Heading</h1>
<p>My first paragraph.</p>
Start tag Element content End tag
<h1> My First Heading </h1>
<p> My first paragraph. </p>
<br> none none
Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering
4/19/2024 8
HTML Headings
HTML headings are defined with the <h1> to <h6> tags.
<h1> defines the most important heading. <h6> defines the least important heading:
<!DOCTYPE html>
<html>
<body style="background-color:powderblue;">
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>
</body>
</html>
Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering
4/19/2024 9
HTML Paragraphs
HTML paragraphs are defined with the <p> tag:
<!DOCTYPE html>
<html>
<body>
<p>This is a paragraph. Bangladesh Army
University of Engineering and
Technology</p>
<hr>
<p>This is another paragraph.</p>
</body>
</html>
Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering
4/19/2024 10
HTML Formatting Elements
 <b> - Bold text
 <strong> - Important text
 <i> - Italic text
 <em> - Emphasized text (mainly use for the blind people). Sound tone different.
 <mark> - Marked text
 <small> - Smaller text
 <del> - Deleted text
 <ins> - Inserted text
 <sub> - Subscript text
 <sup> - Superscript text
Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering
4/19/2024 11
HTML Formatting Elements
<!DOCTYPE html>
<html>
<body>
<p>Web Programming</p>
<p><strong>Internet and Web Programming</strong></p>
</body>
</html>
<!DOCTYPE html>
<html>
<body>
<p>This is some normal text.</p>
<p><small>This is some smaller text.</small></p>
</body>
</html>
Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering
4/19/2024 12
<!DOCTYPE html>
<html>
<body>
<p>My favorite color is <del>blue</del> red.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<body>
<p>My favorite color is <del>blue</del> <ins>red</ins>.</p>
</body>
</html>
HTML Formatting Elements
<!DOCTYPE html>
<html>
<body>
<p>Math Formula Implementation: <br>
(a+b)<sup>2</sup>=a<sup>2</sup>+2ab+b<sup>2</sup></p>
</body>
</html>
Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering
4/19/2024 13
HTML Formatting Elements
In this chapter we will go through the <blockquote>,<q>, <abbr>, <address>, <cite>, and <bdo> HTML elements.
<!DOCTYPE html>
<html>
<body>
<p>Bangladesh Army University of Engineering and Technology</p>
<p> <b> <q>Information and Communication Engineering</q></b></p>
<blockquote cite="http://www.worldwildlife.org/who/index.html">
For 60 years, WWF has worked to help people and nature thrive. As the world's leading conservation organization, WWF works in
nearly 100 countries. At every level, we collaborate with people around the world to develop and deliver innovative solutions that
protect communities, wildlife, and the places in which they live.
</blockquote>
<p>The <abbr title="Information and Communication Engineering">ICE</abbr> was founded on 6 March,2016.</p>
<address>
Mehedi Hasan Imran<br>
Hamdah, Jhenaidah-7300<br>
</address>
</body>
</html>
Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering
4/19/2024 14
The style Attribute
The style attribute is used to add styles to an element, such as color, font, size, and more.
<!DOCTYPE html>
<html>
<body>
<h2>The style Attribute</h2>
<p>The style attribute is used to add styles to an
element, such as color:</p>
<p style="color:red;">This is a red paragraph.</p>
</body>
</html>
Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering
4/19/2024 15
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>
Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering
4/19/2024 16
Background Color
The background-color property defines the background color for an HTML element.
<!DOCTYPE html>
<html>
<!–-This is comment section-->
<body style="background-color:powderblue;">
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering
4/19/2024 17
HTML <bdo> for Bi-Directional Override
BDO stands for Bi-Directional Override.
The HTML <bdo> tag is used to override the current text direction:
<!DOCTYPE html>
<html>
<body>
<p>If your browser supports bi-directional override
(bdo), the next line will be written from right to left
(rtl):</p>
<bdo dir="rtl">Information and Communication
Engineering</bdo>
</body>
</html>
Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering
4/19/2024 18
HTML Link
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<a href="list.html" target="_blank">Go To New File</a>
</body>
</html>
Value Description
_blank Opens the linked document in a new window or tab
_self
Opens the linked document in the same frame as it was clicked
(this is default)
_parent Opens the linked document in the parent frame
_top Opens the linked document in the full body of the window
framename Opens the linked document in the named iframe
Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering
4/19/2024 19
HTML Image
<!DOCTYPE html>
<html>
<body>
<h1>The img element</h1>
<img src=“BAUET.jpg" alt=“BAUET Image" width="500" height="600">
</body>
</html>
Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering
4/19/2024 20
HTML Table
<!DOCTYPE html>
<html>
<style>
table, th, td {
border:1px solid black;
border-collapse: collapse;
padding: 15px;
text-align: center;
}
</style>
<body>
<h2>A basic HTML table</h2>
<table style="width:100%">
<tr>
<th>Name</th>
<th>Department</th>
<th>Batch</th>
</tr>
<tr>
<td>Shuvo</td>
<td>ICE</td>
<td>1st</td>
</tr>
<tr>
<td>Arush</td>
<td>IT</td>
<td>5th</td>
</tr>
<tr>
<td>Zarib</td>
<td>ICT</td>
<td>3rd</td>
</tr>
</table>
</body>
</html>
Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering
4/19/2024 21
HTML Table
<table style="width:100%">
<tr>
<th>Name</th>
<th>Department</th>
<th>Batch</th>
</tr>
<tr>
<td rowspan="2">Arush</td>
<td>ICE</td>
<td>1st</td>
</tr>
<tr>
<td>IT</td>
<td>5th</td>
</tr>
<tr>
<td>Zarib</td>
<td colspan="2">ICT</td>
</tr>
</table>
Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering
4/19/2024 22
HTML List
<!DOCTYPE html>
<html lang="en">
<body>
<h2>An Unordered HTML List</h2>
<ul>
<li>Black Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
<h2>An Ordered HTML List</h2>
<ol type="i">
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
</body>
</html>
Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering
4/19/2024 23
HTML List
Tag Description
<ul> Defines an unordered list
<ol> Defines an ordered list
<li> Defines a list item
<dl> Defines a description list
<dt> Defines a term in a description list
<dd> Describes the term in a description list
Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering
4/19/2024 24
HTML Block and Inline Elements
<!DOCTYPE html>
<html>
<body>
<p style="border: 3px solid blue">Welcome To BAUET</p>
<div style="border: 3px solid green">Welcome To ICE</div>
</body>
</html>
Here are the block-level elements in HTML:
<address> <article> <aside> <blockquote> <canvas> <dd>
<div> <dl> <dt> <fieldset> <figcaption> <figure> <footer>
<form> <h1>-<h6> <header> <hr> <li> <main> <nav> <noscript>
<ol> <p> <pre> <section> <table> <tfoot> <ul> <video>
A 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).
Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering
4/19/2024 25
HTML Block and Inline Elements
An inline element does not start on a new line. An inline element only takes up as much width as necessary.
<!DOCTYPE html>
<html>
<body>
<p>This is an inline span <span style="border: 3px solid
black">Hello World</span> element inside a paragraph.</p>
</body>
</html>
<a> <abbr> <acronym> <b> <bdo> <big> <br> <button> <cite> <code>
<dfn> <em> <i> <img> <input> <kbd> <label> <map> <object> <output>
<q> <samp> <script> <select> <small> <span> <strong> <sub> <sup>
<textarea> <time> <tt> <var>
Here are the inline elements in HTML:
Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering
4/19/2024 26
HTML Iframes
<!DOCTYPE html>
<html>
<body>
<h2>HTML Iframes</h2>
<iframe src="https://bauet.ac.bd/ice/" height="200"
width="400" title="Iframe Example"></iframe>
</body>
</html>
An HTML iframe is used to display a web page within a web page.
Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering
4/19/2024 27
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, initial-
scale=1.0">
</head> <body>
<h2 >An Unordered HTML List</h2>
<ul style="font-size: 2vw;">
<li>Black Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
<h2 >An Ordered HTML List</h2>
<ol type="i" style="font-size: 2vw;">
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol> </body> </html>
HTML Responsive
Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering
4/19/2024 28
Thank You

More Related Content

PPTX
Lec 2 Web.pptxLec 2 Web.pptxLec 2 Web.pptx
PPT
Uta005 lecture2
PPT
Intodcution to Html
PPTX
Web Design and Programming-Lab-4-HTML-II-Exercise
PDF
PPTX
Introduction to HTML.pptx
PDF
Module 1 - Introduction to HTML.pdf
PDF
2a web technology html basics 1
Lec 2 Web.pptxLec 2 Web.pptxLec 2 Web.pptx
Uta005 lecture2
Intodcution to Html
Web Design and Programming-Lab-4-HTML-II-Exercise
Introduction to HTML.pptx
Module 1 - Introduction to HTML.pdf
2a web technology html basics 1

Similar to This slides helps a lot to learn about html tags. (20)

PPTX
Before Starting HTML , some topics to remember.
PPTX
HTML, CSS and XML
PPTX
HTML.pptx
PPTX
Learn html Basics
PPTX
learnhtmlbyvipuladissanayake-170516061515 (1).pptx
PDF
WEB PROGRAMMING bharathiar university bca unitII
PDF
HTML guide for beginners
PPTX
Introduction to HTML- Week 3- HTMLSyntax
PPTX
Unit_II.pptx thtrhththtrhjjuyujymkfhtyhkmythkymkykymnkmyjnmyjmnykn
PPTX
WEBSITE DEVELOPMENT,HTML is the standard markup language for creating Web pag...
PDF
Unit 2 HTML.pdf related to basic HTML cmd
PPTX
Protocols and standards (http , html, xhtml, cgi, xml, wml, c html, etc)
PDF
PPT-203105353-1.pdf
PPTX
Science kjadnckj ljnadjc lk cnldj cj nlzkdncaj
PPTX
WD 2 Less Gooooooooooofwfweujb iefieniwenfwefuhw
PPTX
Xhtml and html5 basics
PDF
Introduction to HTML
PPTX
HTML_HEADER PART TAGS .pptx
PDF
HTML-Part1
Before Starting HTML , some topics to remember.
HTML, CSS and XML
HTML.pptx
Learn html Basics
learnhtmlbyvipuladissanayake-170516061515 (1).pptx
WEB PROGRAMMING bharathiar university bca unitII
HTML guide for beginners
Introduction to HTML- Week 3- HTMLSyntax
Unit_II.pptx thtrhththtrhjjuyujymkfhtyhkmythkymkykymnkmyjnmyjmnykn
WEBSITE DEVELOPMENT,HTML is the standard markup language for creating Web pag...
Unit 2 HTML.pdf related to basic HTML cmd
Protocols and standards (http , html, xhtml, cgi, xml, wml, c html, etc)
PPT-203105353-1.pdf
Science kjadnckj ljnadjc lk cnldj cj nlzkdncaj
WD 2 Less Gooooooooooofwfweujb iefieniwenfwefuhw
Xhtml and html5 basics
Introduction to HTML
HTML_HEADER PART TAGS .pptx
HTML-Part1
Ad

Recently uploaded (20)

PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
RMMM.pdf make it easy to upload and study
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Computing-Curriculum for Schools in Ghana
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PPTX
Cell Structure & Organelles in detailed.
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
RMMM.pdf make it easy to upload and study
Microbial disease of the cardiovascular and lymphatic systems
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
VCE English Exam - Section C Student Revision Booklet
Computing-Curriculum for Schools in Ghana
STATICS OF THE RIGID BODIES Hibbelers.pdf
A systematic review of self-coping strategies used by university students to ...
Anesthesia in Laparoscopic Surgery in India
Orientation - ARALprogram of Deped to the Parents.pptx
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Cell Structure & Organelles in detailed.
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
Abdominal Access Techniques with Prof. Dr. R K Mishra
2.FourierTransform-ShortQuestionswithAnswers.pdf
O7-L3 Supply Chain Operations - ICLT Program
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
Supply Chain Operations Speaking Notes -ICLT Program
Ad

This slides helps a lot to learn about html tags.

  • 1. HTML Tags ICE 4145: Internet and Web Programming Bangladesh Army University of Engineering and Technology (BAUET) Qadirabad Cantonment, Natore. Prepared By Mehedi Hasan Imran Lecturer, BAUET Dept. of ICE Email: [email protected] Department of Information and Communication Engineering (ICE)
  • 2. Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering 4/19/2024 2 Course Outcome (CO) & mapping
  • 3. Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering What is HTML? 4/19/2024 3  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. Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering 4/19/2024 4 HTML Page Structure
  • 5. Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering A Simple HTML Document 4/19/2024 5 <!DOCTYPE html> <html> <head> <title>ICE</title> </head> <body> <h1>Information and Communication Engineering</h1> <p>BAUET</p> </body> </html>
  • 6. Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering 4/19/2024 6 •The <!DOCTYPE html> declaration defines that this document is an HTML5 document •The <html> element is the root element of an HTML page •The <head> element contains meta information about the HTML page •The <title> element specifies a title for the HTML page (which is shown in the browser's title bar or in the page's tab) •The <body> element defines the document's body, and is a container for all the visible contents, such as headings, paragraphs, images, hyperlinks, tables, lists, etc. •The <h1> element defines a large heading •The <p> element defines a paragraph •Element consists of three part 1. Start tag 2. End Tag and 3. Content •Element can be nested <p> This is a <b>man<b> <p>. A Simple HTML Document
  • 7. Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering What is an HTML Element? 4/19/2024 7 An HTML element is defined by a start tag, some content, and an end tag: <tagname> Content goes here... </tagname> The HTML element is everything from the start tag to the end tag: <h1>My First Heading</h1> <p>My first paragraph.</p> Start tag Element content End tag <h1> My First Heading </h1> <p> My first paragraph. </p> <br> none none
  • 8. Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering 4/19/2024 8 HTML Headings HTML headings are defined with the <h1> to <h6> tags. <h1> defines the most important heading. <h6> defines the least important heading: <!DOCTYPE html> <html> <body style="background-color:powderblue;"> <h1>This is heading 1</h1> <h2>This is heading 2</h2> <h3>This is heading 3</h3> <h4>This is heading 4</h4> <h5>This is heading 5</h5> <h6>This is heading 6</h6> </body> </html>
  • 9. Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering 4/19/2024 9 HTML Paragraphs HTML paragraphs are defined with the <p> tag: <!DOCTYPE html> <html> <body> <p>This is a paragraph. Bangladesh Army University of Engineering and Technology</p> <hr> <p>This is another paragraph.</p> </body> </html>
  • 10. Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering 4/19/2024 10 HTML Formatting Elements  <b> - Bold text  <strong> - Important text  <i> - Italic text  <em> - Emphasized text (mainly use for the blind people). Sound tone different.  <mark> - Marked text  <small> - Smaller text  <del> - Deleted text  <ins> - Inserted text  <sub> - Subscript text  <sup> - Superscript text
  • 11. Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering 4/19/2024 11 HTML Formatting Elements <!DOCTYPE html> <html> <body> <p>Web Programming</p> <p><strong>Internet and Web Programming</strong></p> </body> </html> <!DOCTYPE html> <html> <body> <p>This is some normal text.</p> <p><small>This is some smaller text.</small></p> </body> </html>
  • 12. Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering 4/19/2024 12 <!DOCTYPE html> <html> <body> <p>My favorite color is <del>blue</del> red.</p> </body> </html> <!DOCTYPE html> <html> <body> <p>My favorite color is <del>blue</del> <ins>red</ins>.</p> </body> </html> HTML Formatting Elements <!DOCTYPE html> <html> <body> <p>Math Formula Implementation: <br> (a+b)<sup>2</sup>=a<sup>2</sup>+2ab+b<sup>2</sup></p> </body> </html>
  • 13. Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering 4/19/2024 13 HTML Formatting Elements In this chapter we will go through the <blockquote>,<q>, <abbr>, <address>, <cite>, and <bdo> HTML elements. <!DOCTYPE html> <html> <body> <p>Bangladesh Army University of Engineering and Technology</p> <p> <b> <q>Information and Communication Engineering</q></b></p> <blockquote cite="http://www.worldwildlife.org/who/index.html"> For 60 years, WWF has worked to help people and nature thrive. As the world's leading conservation organization, WWF works in nearly 100 countries. At every level, we collaborate with people around the world to develop and deliver innovative solutions that protect communities, wildlife, and the places in which they live. </blockquote> <p>The <abbr title="Information and Communication Engineering">ICE</abbr> was founded on 6 March,2016.</p> <address> Mehedi Hasan Imran<br> Hamdah, Jhenaidah-7300<br> </address> </body> </html>
  • 14. Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering 4/19/2024 14 The style Attribute The style attribute is used to add styles to an element, such as color, font, size, and more. <!DOCTYPE html> <html> <body> <h2>The style Attribute</h2> <p>The style attribute is used to add styles to an element, such as color:</p> <p style="color:red;">This is a red paragraph.</p> </body> </html>
  • 15. Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering 4/19/2024 15 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>
  • 16. Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering 4/19/2024 16 Background Color The background-color property defines the background color for an HTML element. <!DOCTYPE html> <html> <!–-This is comment section--> <body style="background-color:powderblue;"> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html>
  • 17. Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering 4/19/2024 17 HTML <bdo> for Bi-Directional Override BDO stands for Bi-Directional Override. The HTML <bdo> tag is used to override the current text direction: <!DOCTYPE html> <html> <body> <p>If your browser supports bi-directional override (bdo), the next line will be written from right to left (rtl):</p> <bdo dir="rtl">Information and Communication Engineering</bdo> </body> </html>
  • 18. Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering 4/19/2024 18 HTML Link <!DOCTYPE html> <html lang="en"> <head> </head> <body> <a href="list.html" target="_blank">Go To New File</a> </body> </html> Value Description _blank Opens the linked document in a new window or tab _self Opens the linked document in the same frame as it was clicked (this is default) _parent Opens the linked document in the parent frame _top Opens the linked document in the full body of the window framename Opens the linked document in the named iframe
  • 19. Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering 4/19/2024 19 HTML Image <!DOCTYPE html> <html> <body> <h1>The img element</h1> <img src=“BAUET.jpg" alt=“BAUET Image" width="500" height="600"> </body> </html>
  • 20. Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering 4/19/2024 20 HTML Table <!DOCTYPE html> <html> <style> table, th, td { border:1px solid black; border-collapse: collapse; padding: 15px; text-align: center; } </style> <body> <h2>A basic HTML table</h2> <table style="width:100%"> <tr> <th>Name</th> <th>Department</th> <th>Batch</th> </tr> <tr> <td>Shuvo</td> <td>ICE</td> <td>1st</td> </tr> <tr> <td>Arush</td> <td>IT</td> <td>5th</td> </tr> <tr> <td>Zarib</td> <td>ICT</td> <td>3rd</td> </tr> </table> </body> </html>
  • 21. Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering 4/19/2024 21 HTML Table <table style="width:100%"> <tr> <th>Name</th> <th>Department</th> <th>Batch</th> </tr> <tr> <td rowspan="2">Arush</td> <td>ICE</td> <td>1st</td> </tr> <tr> <td>IT</td> <td>5th</td> </tr> <tr> <td>Zarib</td> <td colspan="2">ICT</td> </tr> </table>
  • 22. Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering 4/19/2024 22 HTML List <!DOCTYPE html> <html lang="en"> <body> <h2>An Unordered HTML List</h2> <ul> <li>Black Coffee</li> <li>Tea</li> <li>Milk</li> </ul> <h2>An Ordered HTML List</h2> <ol type="i"> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ol> </body> </html>
  • 23. Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering 4/19/2024 23 HTML List Tag Description <ul> Defines an unordered list <ol> Defines an ordered list <li> Defines a list item <dl> Defines a description list <dt> Defines a term in a description list <dd> Describes the term in a description list
  • 24. Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering 4/19/2024 24 HTML Block and Inline Elements <!DOCTYPE html> <html> <body> <p style="border: 3px solid blue">Welcome To BAUET</p> <div style="border: 3px solid green">Welcome To ICE</div> </body> </html> Here are the block-level elements in HTML: <address> <article> <aside> <blockquote> <canvas> <dd> <div> <dl> <dt> <fieldset> <figcaption> <figure> <footer> <form> <h1>-<h6> <header> <hr> <li> <main> <nav> <noscript> <ol> <p> <pre> <section> <table> <tfoot> <ul> <video> A 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).
  • 25. Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering 4/19/2024 25 HTML Block and Inline Elements An inline element does not start on a new line. An inline element only takes up as much width as necessary. <!DOCTYPE html> <html> <body> <p>This is an inline span <span style="border: 3px solid black">Hello World</span> element inside a paragraph.</p> </body> </html> <a> <abbr> <acronym> <b> <bdo> <big> <br> <button> <cite> <code> <dfn> <em> <i> <img> <input> <kbd> <label> <map> <object> <output> <q> <samp> <script> <select> <small> <span> <strong> <sub> <sup> <textarea> <time> <tt> <var> Here are the inline elements in HTML:
  • 26. Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering 4/19/2024 26 HTML Iframes <!DOCTYPE html> <html> <body> <h2>HTML Iframes</h2> <iframe src="https://bauet.ac.bd/ice/" height="200" width="400" title="Iframe Example"></iframe> </body> </html> An HTML iframe is used to display a web page within a web page.
  • 27. Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering 4/19/2024 27 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial- scale=1.0"> </head> <body> <h2 >An Unordered HTML List</h2> <ul style="font-size: 2vw;"> <li>Black Coffee</li> <li>Tea</li> <li>Milk</li> </ul> <h2 >An Ordered HTML List</h2> <ol type="i" style="font-size: 2vw;"> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ol> </body> </html> HTML Responsive
  • 28. Mehedi Hasan Imran, Lecturer, Department of Information and Communication Engineering 4/19/2024 28 Thank You