PDF HTML
PDF HTML
PDF HTML
HTML is a markup
language and makes use
of various tags to format
the content. These tags
are enclosed within angle
braces <Tag Name>
What is an HTML Element?
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>
<h1>This is <i>italic</i> heading</h1> (NESTED ELEMENT)
HTML Body TAG
• BGCOLOR: It changes the default background color.
• Background: This tag specifies the name of the jpg file (img) that used as background of
the document.
• Text : This tag changes the body text color.
Example
<body bgcolor=red text=yellow>This is heading 1</body>
Example
<body background= file:///E:/CORE%20COMPUTER%20Shop%20work/adca%20certificate.jpg >This is heading 1</body>
HTML Headings
HTML headings are defined with the <h1> to <h6> tags.
<br> Use <br> if you want a line break (a new line) without starting a new paragraph
<pre>
The text inside a <pre> element is displayed in a fixed-width font (usually
Courier), and it preserves both spaces and line breaks:
<!-- -> Comments Not visible on Webpage: <!--- Your comments here -->
HTML Font Tag
HTML Font tag provides no real function, but with the
help of a few attributes, this tag is used to chnge the
style, size, and color of HTML text element.
<font color=“red”>Heading 1</font>
<font size=“5”>Heading 1</font>
<font face=“arial”> </font>
HTML Formatting Elements
• <b> - Bold text
<b>This text is bold</b>
• <u> - Underling text
• <i> - Italic text
<i>This text is italic</i>
• <em> - Emphasized text
• <mark> - Marked text
<u>This text is Underline</u>
• <small> - Smaller text
• <del> - Deleted text
<del>This text is Underline</del>
• <ins> - Inserted text
• <sub> - Subscript text <sup> a2+b2 </sup>
• <sup> - Superscript text
HTML Links
HTML links are defined with the <a> tag:
<a href="https://www.w3schools.com">This is a link</a>
<a href="https://www.google.com">Core Computer Center</a>
HTML Images
HTML images are defined with the <img> tag.
The source file (src), alternative text (alt), width, and height are provided as attributes:
•The <a> tag defines a hyperlink. The href attribute specifies the URL of the page the link
goes to: <a href="https://www.w3schools.com">Visit W3Schools</a>
•The <img> tag is used to embed an image in an HTML page. The src attribute specifies the
path to the image to be displayed:
<img src="img_girl.jpg">
• <p style="color:red;">This is a red paragraph.</p>
HTML Styles
The HTML Style Attribute
<tagname style="property:value;">
The CSS background-color property defines the background color for an HTML element.
<body style="background-color:powderblue;">
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
Text Color/Size/Alignment/Border
<h1 style="color:blue;">This is a heading</h1>
<h1 style="font-size:300%;">This is a heading</h1>
<h1 style="text-align:center;">Centered Heading</h1>
<h1 style="border:2px solid Tomato;">Hello World</h1>
HTML Styles CSS
•The HTML style attribute is used to add styles to an element,
such as color, font, size, and more.
<tagname style="property:value;">
I am Red
<h1 style="color:red;">I am Red</h1>
<p style="color:blue;">I am Blue.</p>
I am Blue
<h1 style="font-size:300%;">I am Big</h1> I am Big
HTML Headings
•HTML headings are defined • The <font> tag Not Supported in HTML5.
with the <h1> to <h6> tags. •The <font> tag was used in HTML 4 to specify the font face,
font size, and color of text.