2 HTML
2 HTML
Web Page
• A Web page is a document commonly written in HTML (Hypertext Markup Language) that can be
• It is accessed by entering a URL address and may contain text, graphics, and hyperlinks to
• Static pages show the same content each time they are viewed.
• Dynamic pages provide custom content based on the results of a search or request.
Webserver
• Hosting means that all the web pages and their supporting files are available on that computer.
• The Web server helps to send any web page from the website.
Access Web App Globally = Frontend script + Backend code + Web Server + Domain
5 Hyper Text Markup Language | © SmartCliff | Internal | Version 1.3
Hypertext Markup Language (HTML)
URL
Top level
Subdomain Domain Webpage
Domain Directories
Protocol Name
Markup Language
• A Markup language is a computer language that uses tags to define elements within a document.
• It is human-readable, meaning Markup files contain standard words, rather than typical programming
syntax.
• The language specifies code for formatting, layout, and style, within a text file.
• HTML and XML (eXtensible Markup Language) is an example of a widely known and used Markup
language.
Introduction to HTML
What is HTML?
• HTML stands for HyperText Markup Language and it is used to create webpages.
• It uses HTML tags and attributes to describe the structure and formatting of a web page.
• HTML consists of various elements, that are responsible for telling search engines how to display page
content.
Features of HTML
• It is platform-independent.
• It is a markup language.
• Web browsers can read HTML files and render them into visible or audible web pages.
• Browsers do not display the HTML tags and scripts but use them to interpret the page’s content.
HTML Versions
• HTML Editors are tools to write and run (in some cases) an HTML code.
• There are several HTML Editors available to the user (paid and unpaid).
• Text-Based
• WYSIWYG
• Text-based HTML editors allow the user to write and compile code.
• Notepad++
• VS Code
• Atom
• Sublime Text
• Bluefish
Features:
• Syntax Highlighting:
• Notepad++ highlights the syntax of HTML, JavaScript, and other programming languages to improve
• Notepad++ provides a powerful search and replace option, allowing users to replace text across
• Easy Navigation:
• Notepad++ facilitates easy navigation between opened files, making it simple to manage and switch
• Resource Efficiency:
• Notepad++ uses fewer system resources compared to other editors, ensuring smooth performance
by Microsoft.
completion, etc.
Features:
• Autocompletion:
• VS Code provides intelligent code suggestions and autocompletion to enhance coding speed and
efficiency.
• VS Code offers a wide range of plugins for customization, enabling users to add unique features
• VS Code includes inbuilt Git command support for seamless version control, allowing users to
commit, merge, and manage their repositories directly from the editor.
• VS Code is equipped with powerful debugging tools that help users diagnose and fix issues in their
code effortlessly.
Features:
• Autocompletion:
• Atom provides intelligent code suggestions and autocompletion to enhance coding speed and
efficiency.
• Atom offers access to a massive library of open-source packages, allowing users to extend the
• Cross-Platform Support:
• Atom is supported on all major operating systems, including Windows, Linux, and macOS.
• Atom allows for peer coding through its Teletype feature, enabling real-time collaboration with fellow
developers.
symbols, or lines.
selected areas.
Features:
• Highly Customizable:
• Sublime Text is a highly customizable editor, allowing users to choose from multiple templates with a
variety of features.
• Sublime Text makes it easy to switch between different projects, enhancing workflow efficiency.
• Sublime Text features a less complex user interface compared to other editors but retains the option
• Sublime Text allows making changes instantly by selecting and editing multiple instances of the same
keyword.
efficiency.
Features:
• Bluefish is extremely fast compared to other editors and has low memory usage, making it efficient
and responsive.
• Bluefish can easily handle large files and manage multiple files simultaneously, ensuring smooth
• Autocompletion:
• Bluefish provides intelligent autocompletion, allowing users to code faster and more efficiently.
• Bluefish supports advanced project management features, enabling smooth workflow without
WYSIWYG Editor
• They’ll show a preview of the source code, as it will appear in the web browser.
• They also don’t require strong HTML knowledge so less tech-savvy users can develop websites easily.
• Adobe Dreamweaver CC
• Froala
• Setka Editor
• Adobe Dreamweaver CC is a powerful web design and development application that is part of Adobe
Creative Cloud.
• It provides a comprehensive environment for creating, editing, and managing websites and web
applications.
• Dreamweaver supports both visual design and code-based editing, making it suitable for a wide
Features:
• Visual and Code Editors: Switch between Design View (WYSIWYG) and Code View to see changes in
• Responsive Design Tools: Built-in tools for designing and previewing websites on different devices and
screen sizes.
• Code Hinting and Autocompletion: Helps with writing code by providing suggestions and completing
code automatically.
• Live Preview: See how your website looks as you edit, with live updates and responsive previews.
• Site Management: Tools for managing site files, including site synchronization, FTP support, and file
management.
• Templates and Starter Layouts: Pre-built templates and layout options to get started quickly.
• Integration with Other Adobe Tools: Seamless integration with other Creative Cloud apps like
• Preprocessors Support: Built-in support for CSS preprocessors like SASS and LESS.
• Froala is a popular WYSIWYG HTML editor that is designed for ease of use and powerful
functionality.
• It can be used to create and edit HTML content visually, making it a great tool for web development
Features:
• Rich Text Editing: Provides options for formatting text, adding images, videos, links, and more.
• Code View: Allows you to view and edit the HTML code directly.
• Customizable: Offers numerous plugins and customization options to fit different needs.
• Setka Editor is a modern WYSIWYG editor designed for content creation with a focus on simplicity
and efficiency.
• It provides a range of features to help users create, format, and manage content for websites and digital
platforms.
Features:
• User-Friendly Interface: A clean and intuitive interface for both novice and experienced users.
• Rich Text Formatting: Options for text formatting, such as headings, bold, italic, and lists.
• Design Blocks: Pre-designed content blocks for quickly building sections of a page.
• Responsive Design: Ensures that content looks good on various devices and screen sizes.
• Code View: Allows you to view and edit the HTML code directly.
• Customizable Templates: Offers templates and design elements that can be customized to fit your
brand or style.
HTML Tags:
• Tags are similar to keywords, which specify how a web browser will format and display content.
• A web browser can differentiate between simple content and HTML content with the use of tags.
• There are opening(< >) and closing tags(</ >) for many but few tags do not have closing tags.
HTML Elements:
• It consists of a start tag, an end tag, and the content between them.
• Attributes are used to customize an element's behavior, special terms called HTML attributes are
utilized inside the opening tag.
HTML Attributes:
• Name:
• Value:
• It holds the value that the user wants the value of the property to be set and always put within
quotations.
• HTML elements are hierarchical, meaning the elements can be inside of an element.
• But there are a few rules to follow like the head can not be placed inside of a body like that so to know
</html>
45 Hyper Text Markup Language | © SmartCliff | Internal | Version 1.3
HTML Basics
• The <!DOCTYPE> declaration must be the first thing in your HTML document, before the <html> tag.
• The <!DOCTYPE> declaration is not an HTML tag; it is an instruction to the web browser about
what version of HTML the page is written in.
• HTML 4.01/XHTML
• The DTD specifies the rules for the markup language so that the browsers render the content correctly.
• This tag is the container for all other HTML elements (except for the <!DOCTYPE> tag).
• This tag encloses the complete HTML document and mainly comprises of:
• This element can include a title for the document, scripts, styles, meta information, and more.
• <title>
• <style>
• <base>
• <link>
• <meta>
• <script>
• <noscript>
• The <title> tag is used within the <head> section to define the title of the HTML document.
• It appears in the browser tab or window and briefly describes the webpage’s content.
• This element contains all the contents of an HTML document, such as text, hyperlinks, images, tables,
lists, etc.
• All elements within this tag are displayed on the webpage when viewed in a browser.
• Step 1:
Step 2: Type the below code in the New File shown as Untitled-1
<!DOCTYPE html>
<html>
<head>
<title>My First HTML Page</title>
</head>
<body>
Hello, I am here on your webpage!
</body>
</html>
• Step 3:
Step 6: Then choose a web browser like Chrome or Edge to display the output
HTML header
<!DOCTYPE HTML>
<html>
<head>
<title>My First HTML Page</title>
</head>
<body>
Hello, I am here on your webpage!
</body>
</html>
HTML body
• The HTML source code should be formatted to increase readability and facilitate debugging.
<!DOCTYPE html>
• The <p> tag offers a way to structure the text
<html>
into different paragraphs, essential for creating <body>
<p>This is a paragraph1.</p>
well-organized and readable web content.
<p>This is a paragraph2.</p>
<p>This is a paragraph3.</p>
• Each paragraph of text should go in between
</body>
an opening <p> and a closing </p> tag. </html>
<body>
</body>
</html>
• HTML also has six levels of headings, which use the elements <h1>, <h2>, <h3>, <h4>, <h5>, and <h6>.
• While displaying any heading, the browser adds one line before and one line after that heading.
<html>
<body>
<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>
<!DOCTYPE html>
<html>
<body>
<p>
This is<br>a para<br>graph with line breaks
</p>
</body>
</html>
• The <hr> tag is used to break the page into <h1>Section II</h1>
<p>
various parts, creating horizontal margins with Architecture of Computer<br>
Different Component of Computer<br>
the help of a horizontal line running from the left to </p>
<hr>
right-handhtml>
<!DOCTYPE side of the page. </body>
</html>
•<html>
This is also an empty tag which means that it has
<body>
no end tag.
<h1>Section I</h1>
<p>
Introduction to Computer<br>
Application of Computer<br>
</p>
<hr>
• Text in this element is displayed in a fixed-width font (usually Courier), and it preserves both spaces
• The text follows the exact format of how it is written in the HTML document.
• Any text between the opening <pre> tag and the closing </pre> tag will preserve the formatting of the
source document, which means if the user adds a new line character between two letters that will be
<!DOCTYPE html>
<html>
<body>
<pre>
My Bonnie lies over the ocean.
</body>
</html>
• The <center> tag can be used to put any content in the center of the page or any table cell.
<!DOCTYPE html>
<html>
<head>
<title>Centering Content Example</title>
</head>
<body>
<p>This text is not in the center.</p>
<center>
<p>This text is in the center.</p>
</center>
</body>
</html>
72 Hyper Text Markup Language | © SmartCliff | Internal | Version 1.3
HTML Basics
Note:
• This means it is no longer recommended for use in modern web development, and it may not be
• Instead, CSS (Cascading Style Sheets) should be used to achieve the same effect.
• Simple elements
• Nested elements
• Empty elements
• A simple element is an HTML element that contains only text content or a single HTML tag without any
nested elements.
<h1>Heading 1</h1>
• Nested elements are HTML elements that contain other HTML elements within them.
<div>
<h1>Welcome to My Website</h1>
</div>
• They are used to insert something into the document, such as a line break, an image, metadata, or a
horizontal ruler.
<br>
<meta charset="UTF-8">
<hr>
HTML Attributes
• Attributes can control various aspects of elements, such as their behavior, appearance, and other
properties.
Classification of Attributes
• HTML attributes can be classified into several categories based on their purpose and usage:
• Internationalization Attributes
• Global attributes are common to all HTML elements and can be used universally.
• These attributes are readily usable with many of the HTML tags.
https://www.w3schools.com/tags/ref_standardattributes.asp
<table bgcolor="cyan">
<tr>
<td>This table has a cyan background color.</td>
</tr>
</table>
<p>
<img src="smiley.png" width="100" height="100" />
</p>
<p style="color: red; font-size: 20px;">This text is
styled using the style attribute.</p>
</body>
</html>
• In HTML, internationalization attributes ensure that web content is accessible and correctly presented in
different languages and cultures.
dir ltr, rtl Specifies the text direction of the element's content.
</body>
</html>
HTML Display
• Every HTML element has a default display value depending on the element type.
• Block Elements
• Inline Elements
• They determine the layout and structure of a page by influencing how elements flow and interact.
• Block elements are used to create the logical and semantic layout of a web page.
• They help to organize the content into meaningful sections and make it easier for browsers, search
engines, and site visitors to understand the structure and meaning of different parts of the web page.
• They take up the full width available (by default), and they start on a new line.
• They stack vertically, one after the other, with each new block element starting on a new line.
Structural Elements
Text Content
Lists
Form Elements
<button>
Media
Tables
Interactive Elements
Script Elements
• This block-level element is used to group large sections of HTML content and structure the layout.
• It provides a container to organize, and style sections, facilitating layout design and CSS styling.
• It takes up the full width of its container and starts on a new line, pushing any following content down.
• It has both opening(<div>) and closing (</div>) tags and it is mandatory to close the tag.
• Browsers add line breaks before and after ‘<div>’ elements by default.
initial-scale=1.0"> </div>
</head> </body>
<body> </html>
<p>Some Paragraph</p>
• Inline elements only take up as much width as necessary and do not start on a new line.
• They flow horizontally within a block element and don't break the line.
<optgroup>
Media Elements
<embed>
Script Elements
<font> <basefont>
• It's typically used for applying styles or JavaScript functionality to a small portion of text or inline elements
• This element does not start on a new line and only takes up as much width as necessary, allowing
• It has both opening(<span>) and closing (</span>) tags and it is mandatory to close the tag.
</head> </div>
</html>
<audio>
Note :
Take up the full width of their parent Take up only as much width as
Width
container by default. necessary to display their content.
All types of margins and padding can be Only horizontal margins and padding
Margins and padding
applied to them. can be applied to them.
HTML Formatting
• Large or small screens and resized windows will create different results.
• With HTML, the output cannot be changed by adding extra spaces or extra lines in the HTML code.
• The browser will remove extra spaces and extra lines when the page is displayed.
• Any number of spaces, and any number of new lines, count as only one space.
• HTML Formatting is a process of formatting text for a better look and feel.
HTML Formatting
• HTML Formatting is the way of representing textual context on the website in a better way, so the user
• Physical Tags
• Logical Tags
• Physical tags are used to directly define the visual appearance of text, such as making it bold or italic.
• These tags specify how the text should be displayed, regardless of its context or meaning.
• These tags were widely used in earlier versions of HTML but are now often replaced by CSS or logical
• Logical tags define the meaning or importance of the text rather than its appearance.
• These tags give semantic meaning to the text, and the browser or other user agents determine the
appropriate styling.
• Logical tags are preferred in HTML5 for their semantic value, which improves accessibility and SEO.
106 Hyper Text Markup Language | © SmartCliff | Internal | Version 1.3
HTML Basics
Largely deprecated in favor of CSS for visual Encouraged in modern HTML for their
Modern Use
styling. semantic value.
<b> This is a physical tag, which is used to bold the text written between it.
<u> This is a physical tag used to underline text written between it.
<s> This is a physical tag that is used to strike through text to indicate something is no longer
correct or relevant.
<small> This tag is used to decrease the font size by one unit from base font size.
<font> Changes font face, size, and color (Deprecated; use CSS).
</body>
</html>
• The following elements are phrase tags that focus on the text’s meaning, structure, or context, which may
or may not include visual styling.
<strong> This is a logical tag, which tells the browser that the text is important.
<blockquote> Used for long quotations, displayed as a separate block, typically indented.
<abbr> Defines an abbreviation or acronym, optionally providing a full form through the title
attribute.
<bdi> Isolates a span of text that might be formatted differently from its surrounding text, often for
bidirectional text.
<bdo> Overrides the current text direction, useful for bidirectional text.
<span> A generic inline container for text, allowing CSS styling or scripting.
<acronym> Deprecated tag formerly used for acronyms, now replaced by <abbr>
• Links can be text, images, or other elements, enhancing web navigation and interactivity.
• This tag is called an anchor tag and anything between the opening <a> tag and the closing </a> tag
becomes part of the link.
Syntax:
<a href="URL">Link Text</a>
• href: Specifies the destination URL or the location to which the link should lead.
• Link Text: The clickable text that users see on the webpage.
• A hyperlink is a text or an image you can click on, and jump to another document.
_self: Opens the linked document in the same frame as it was clicked (this is default)
_top: Opens the linked document in the full body of the window
<p>Open link in a new window or tab: <a href="http://www.w3schools.com" target="_self" >Visit W3Schools!</a></p>
• HTML bookmarks are used to allow readers to jump to specific parts of a Web page.
• To make a bookmark, you must first create the bookmark, and then add a link to it.
• When the link is clicked, the page will scroll to the location with the bookmark.
• Use the HTML src attribute to define the URL of the image.
• Use the HTML alt attribute to define an alternate text for an image, if it cannot be displayed.
• Use the HTML width and height attributes to define the size of the image.
<p>An image:
<img src="smiley.png" alt="Smiley face" width="42" height="42"></p>
<p>A moving image:
<img src="programming.gif" alt="Computer man" width="48" height="48"></p>
<p>Note that the syntax of inserting a moving image is no different from a non-moving image.</p>
<p>Insert an image from One Level down of the current web site:</p>
<img border="0" src="images/Test/merglobe.gif" alt=“Merglobe" width="104" height="142">
• The name attribute of the <map> tag is associated with the <img>'s usemap attribute and creates a
relationship between the image and the map.
• The <map> tag contains a number of <area> tags, that defines the clickable areas in the image-map
• Shape: To define the shape of the clickable area, and you can choose one of these values:
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" alt="Sun" href="sun.html">
<area shape="circle" coords="90,58,3" alt="Mercury" href="merglobe.gif">
<area shape="circle" coords="124,58,8" alt="Venus" href="information_about_the_planet_venus.txt">
</map>
• The <figure> element identifies self-contained content related to the main content, such as an image,
table, or chart.
• The <figcaption> element is often nested within a <figure> element to add a caption to the content
• A caption can be associated with the <figure> element by inserting a <figcaption>inside it (as the first or
• The first <figcaption> element found in the figure is presented as the figure's caption.
<figure>
<img src="flamingo.jpg" alt="flamingo">
</figure>
<figure>
<img src="elephant.jpg" alt="Elephant">
<figcaption><i>fig. 1</i> An Elephant at Sunset</figcaption>
</figure>
• Tables are divided into table rows with the <tr> tag.
• They can contain all sorts of HTML elements like text, images, lists, other tables, etc.
• The <caption> tag must be inserted immediately after the <table> tag.
• A table row can also be divided into table headings with the <th> tag.
<table border="1">
<caption>First Table</caption>
<tr>
<th>First</th>
<th>Second</th>
<th>Thrid</th>
</tr>
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
<td>Cell 3</td>
</tr>
<tr>
<td>Cell 4</td>
<td>Cell 5</td>
<td>Cell 6</td>
</tr>
</table>
• The cellspacing attribute defines the width of the border, while cellpadding represents the distance
between cell borders and the content within a cell.
• The attributes COLSPAN ("how many across") and ROWSPAN ("how many down") indicate how many
columns or rows a cell should take up.
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</table>
• The <colgroup> tag specifies a group of one or more columns in a table for formatting.
• The <colgroup> tag is useful for applying styles to entire columns, instead of repeating the styles for
each cell, for each row.
• To define different properties to a column within a <colgroup>, use the <col> tag within the <colgroup>
tag.
<table> <tr>
<colgroup> <td>3476896</td>
<col span="2" style="background-color:red"> <td>My first HTML</td>
<col style="background-color:yellow"> <td>$53</td>
</colgroup> </tr>
<tr> <tr>
<th>ISBN</th> <td>5869207</td>
<th>Title</th> <td>My first CSS</td>
<th>Price</th> <td>$49</td>
</tr> </tr>
</table>
• HTML lists are used to present list of information in well formed and semantic way. There are three
different types of list in HTML and each one has a specific purpose and meaning.
Ordered list
• Used to create a list of related items, in a specific order. All the list items are marked with numbers by
default. It is also known as numbered list.
Unordered list
• Used to create a list of related items, in no particular order. All the list items are marked with bullets.
It is also known as bulleted list.
Description list
Note: we used the “start” attribute on the “ol” tag to restart the numbering at "3" following the break in the
list above.
<!--
Comments
-->
• Comments helps coders to improve the code readability and to understand more about the code
HTML Favicon
• A favicon is a small file containing one or more icons that are used to represent the website or a
blog.
• It is also known as a tab icon, website icon, URL icon, or bookmark icon.
• It is a small image displayed next to the page title in the browser tab.
HTML Favicon
• To add a favicon to your website, either save your favicon image to the root directory of your web
server, or create a folder in the root directory called images, and save your favicon image in this
folder.
• Next, add a <link> element to your "index.html" file, after the <title> element.
HTML Favicon
<!DOCTYPE html>
<html>
<head>
<title>My Page Title</title>
<link rel="icon" type="image/x-icon" href="/images/favicon.ico">
</head>
<body>
<h1>This is a Heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
HTML Favicon
• Favicon File Format Support
HTML Emoji
• Emojis are small digital images or icons that are generally used in messaging and other places to
express emotions or ideas.
• To display an HTML page correctly, a web browser must know the character set used in the page.
• Approach
• By setting the charset used to display webpages in the browser to UTF-8, emojis can be added
to HTML documents.
• Use the <meta> tag in the head section to specify this character encoding information.
• Emojis can be added to HTML after the charset has been declared by utilising the p and span
tags.
163 Hyper Text Markup Language | © SmartCliff | Internal | Version 1.3
HTML Basics
HTML Emoji
• While the emoji is inserted in the same line using the <span> tag, it is inserted in a new line using
• The hexadecimal and decimal codes for emojis start with &#x and end with “;” to inform the browser,
HTML Emoji
<!DOCTYPE html>
<html>
<head>
<title>Emojis</title>
</head>
<body>
<!--Emojis-->
<p>Emoji : 😜</p> →Decimal
<p>Emoji : 😜</p> →Hexadecimal
</body>
</html>
• HTML Forms are required when you want to collect some data from the site visitor.
• For example during user registration you would like to collect information such as name, email address,
credit card, etc.
• A form will take input from the site visitor and then will post it to a back-end application such as CGI,
ASP.Net or PHP script etc.
• The back-end application will perform required processing on the passed data based on defined
business logic inside the application.
<form>
.
form elements
.
</form>
• Form elements are different types of input elements, checkboxes, radio buttons, submit buttons,
and more.
• The action attribute defines the action to be performed when the form is submitted.
• The common way to submit a form to a server, is by using a submit button. Normally, the form is
submitted to a web page on a web server.
<form action="action_page.html">
• The method attribute specifies the HTTP method (GET or POST) to be used when submitting the forms:
(OR)
Get Method
• We can use GET (the default method) If the form submission is passive (like a search engine query),
and without sensitive information.
• When you use GET, the form data will be visible in the page address:
action_page.html?firstname=Arul&lastname=Kumar
Post Method
• We can use the POST method If the form is updating data, or includes sensitive information
(password).
• POST offers better security because the submitted data is not visible in the page address.
• <label>
• <select>
• <textarea>
• <button>
• <fieldset>
• <legend>
• <datalist>
• <output>
• <option>
• <optgroup>
170 Hyper Text Markup Language | © SmartCliff | Internal | Version 1.3
HTML Basics
• The <input> element has many variations, depending on the type attribute.
Example:
• radio Defines radio button input (for selecting one of many choices) <input type="radio">
• submit Defines a submit button (for submitting the form) <input type="submit">
• Etc.,
• The <label> element is useful for screen-reader users, because the screen-reader will read out loud the
<form action="">
<label for="fname">First name:</label><br>
<input type="text" id="fname" name="fname"><br><br>
<input type="submit" value="Submit">
</form>
<form action="/action_page.php">
<label for="cars">Choose a car:</label>
<select id="cars" name="cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
</select>
<input type="submit">
</form>
https://www.w3schools.com/html/html_form_elements.asp
https://www.w3schools.com/html/html_form_attributes.asp
HTML Layout
• Page layout is the part of graphic design that deals with the arrangement of visual elements on a
page.
• It establishes the overall appearance, relative importance, and relationships between the graphic
elements to achieve a smooth flow of information and eye movement for maximum effectiveness or
impact.
HTML Layout
HTML5 offers new semantic elements that define different parts of a web page:
HTML Layout
• The <div> element is often used as a layout tool, because it can easily be positioned with CSS.
• CSS flexbox
Will discuss later
• CSS framework
• CSS grid
• An iframe or inline frame is used to display external objects including other web pages within a web
page.
<iframe src="URL"></iframe>
• The src attribute specifies the URL (web address) or any web page of the iframe page.
<iframe src="demo_iframe.htm" width="200" height="200"></iframe>
<iframe src="demo_iframe.htm" style="border:none"></iframe>
<iframe src="demo_iframe.htm"
1 style="border:5px dotted2red"></iframe> 3
<p>When the target of a link matches the name of an iframe, the link will open in the iframe.</p>
• The <meta> tag provides metadata about the HTML document. Metadata will not be displayed on the
page, but will be machine parsable.
• Meta elements are typically used to specify page description, keywords, author of the document, last
modified, and other metadata.
• The metadata can be used by browsers (how to display content or reload page), search engines
(keywords), or other web services.
• Setting the viewport to make your website look good on all devices:
• Etc.,
183 Hyper Text Markup Language | © SmartCliff | Internal | Version 1.3
HTML Basics
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="description" content="Free Web tutorials">
<meta name="keywords" content="HTML,CSS,XML,JavaScript">
<meta name="author" content="Hege Refsnes">
<meta http-equiv="refresh" content="30">
</head>
<body>
<p>All meta information goes in the head section...</p>
</body>
</html>
HTML Media
• Examples: Images, music, sound, videos, records, films, animations, and more.
• Before HTML5, videos could only be played with a plug-in (like flash).
• The HTML5 <video> element specifies a standard way to embed a video in a web page.
• Currently, there are 3 supported video formats for the <video> element: MP4, WebM, and Ogg.
• The controls attribute adds video controls, like play, pause, and volume.
• If height and width are not set, the browser does not know the size of the video. The effect will be that
the page will change (or flicker) while the video loads.
• Text between the <video> and </video> tags will only display in browsers that do not support the
<video> element.
• Multiple <source> elements can link to different video files. The browser will use the first recognized
format.
• The controls attribute adds audio controls, like play, pause, and volume.
• Multiple <source> elements can link to different audio files. The browser will use the first recognized
format.
• Currently, there are 3 supported file formats for the <audio> element: MP3, Wav, and Ogg.
<audio controls>
<source src="Sample.mpeg" type="audio/mpeg">
<source src="horse.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
• To the left of the text box, pick the size you want by clicking the Down arrow .
• Copy the text in the box. Paste it into the HTML of your website or blog.
Quiz
a) <td> </td>
b) <cr> </cr>
c) <tr> </tr>
d)<th> </TR>
Quiz
2. How can apply the background color for the HTML Page?
a) <body color="Red"></body>
b) <body background>Red</body>
c) <body background="Red"></body>
d) <body bgcolor="Red"></body>
Quiz
3. Which tag will help you to create a Checkbox component in a HTML form?
a) <checkbox>
b) <input type="checkbox">
c) <input=checkbox>
d) <input checkbox>
Quiz
Quiz
a) <font color="red">
b) <font background-color="red">
c) <font bgcolor="red">
d) <font background="red">