Professional Documents
Culture Documents
OGUN STATE
HTML is often assisted by technologies such as Cascading Style Sheets (CSS) and JavaScript,
which makes the HTML beautiful and interactive, respectively. It’s better to describe the
relationship between HTML, CSS, and Javascript using a building. In a building:
• THE FIRST VERSION OF HTML, HTML 1.0, was released in 1993. But not many of
the developers were involved in creating websites. So the language was also not growing.
This version only had basic tags like text, even tables and fonts were not available in this
version.
• THE SECOND VERSION OF THE HTML, HTML 2.0, was released in 1995, which
contains all the features of HTML 1.0 along with a few additional features. Until the release
of HTML 3.0, it remains the standard markup language for creating websites.
• THE THIRD VERSION OF HTML, HTML 3.2, was released in 1997 as W3C’s first
recommendation for HTML. This version added widely deployed features such as tables,
text-flow around images, super-scripts & subscripts. One most important thing that was
added in this version was the support of CSS.
• THE FOURTH VERSION OF HTML, HTML 4.01, was released in 1999 as W3C’s
recommendation. This version was the most successful of all previous HTML released
versions. In this version features like multimedia, better printing features and more were
added.
• THE LATEST VERSION OF HTML, HTML 5, was released in 2014 as W3C’s
recommendation. It was an extended version of HTML 4.01 published in 2012. Many new
tags were added in this version like <header>, <footer>, <main>, <video>, etc. HTML5
supports mathML and SVG in text.
HTML TAGS
HTML tags are the most basic building block of elements in HTML. HTML tags are like a
signboard that tells the browser how to display and format content inside the tag.
Example <p>, <header>, <footer>, etc.
HTML elements with no content are called empty elements. The <br> tag defines a line break,
and is an empty element without a closing tag. Example: <h1>My <br> First Heading</h1>.
HTML ATTRIBUTES
HTML attribute is a property of an HTML element that can be used to add extra functionality
to an element. These attributes are placed in the opening tag and range from style and ids to
classes. Attributes usually come in name/value pairs like: name="value". Examples include:
class, href, id, src, alt, height, weight, style, lang, title etc.
1. HREF ATTRIBUTE
The href attribute of <a> specifies the URL of the page the link goes to. Example:
<a href="URL of page">Visit page</a>.
2. SRC ATTRIBUTE
The src attribute of <img> specifies the path to the image to be displayed. Example: <img
src="img_girl.jpg">.
There are two ways to specify the URL in the src attribute:
1. Absolute URL: Links to an external image that is hosted on another website.
2. Relative URL: Links to an image that is hosted within the website. Here, the URL
does not include the domain name. If the URL begins without a slash, it will be
relative to the current page. Example: src="img_girl.jpg". If the URL begins with a
slash, it will be relative to the domain. Example: src="/images/img_girl.jpg". It is
almost always best to use relative URLs, since they will not break if you change
domain.
3. WIDTH AND HEIGHT ATTRIBUTE
The width and height attributes of <img> provide size information for images. Example:
<img src="img_girl.jpg" width="150" height="100">.
4. ALT ATTRIBUTE
The alt attribute of <img> provides an alternate text for an image, if the image for some
reason cannot be displayed. Example: <img src="img_girl.jpg" alt="Girl with a jacket">
5. STYLE ATTRIBUTE
The style attribute is used to add styles to an element, such as color, font, size, and more.
6. LANG ATTRIBUTE:
The lang attribute of the <html> tag declares the language of the Web page. This is meant
to assist search engines and browsers. Example:
<!DOCTYPE html>
<html lang="en">
<body>
...
</body>
</html>
7. TITLE ATTRIBUTE
The title attribute defines some extra information about an element. The value of the title
attribute will be displayed as a tooltip when you mouse over the element. Example: <p
title="I'm a tooltip">This is a paragraph.</p>.
SEMANTIC HTML
Semantic HTML means that your HTML tags convey the actual meaning of what they are used
for. With semantic HTML, semantically-neutral tags such as <div> and <span> are frowned
upon since semantically more descriptive tags such as <header>, <nav>, <main>, <section>,
<footer> and <article> can do the same thing they do.
SEMANTIC TAGS
1. <header>
The <header> element defines the introductory section of a web page. It contains items
such as the logo, navigation, theme switcher, and search bar.
2. <main>
The <main> contains the main sections of the HTML document apart from <header> and
<footer>. Ideally, there should be just one of these in the whole HTML document.
3. <section>
The <section> element defines a particular section of the web page. This may be the
showcase section, about section, contact section, or others. You can use numerous sections
in a single HTML document.
4. <article>
The <article> element represents a certain part of a web page that conveys some particular
information. Such information could be a combination of text, images, videos, and embeds.
5. <aside>
As the name implies, this represents a sidebar on a web page. It is usually a part of the web
page that is not directly related to the main content.
6. <footer>
The <footer> element accommodates items such as quick links, copyright information, or
any other data related to the entire website or web page.
HTML TEXT EDITORS
Some HTML text editors can create the basic layout of a webpage just by writing a few keys
or can auto close the tags or can format your text document and many more. Some of these
editors include:
1. Window Notepad.
2. Notepad++.
3. Sublime Text Editor.
4. Visual Studio Code.
1. WINDOWS NOTEPAD
Notepad is a simple text editor that comes up with windows systems, which is generally
used to create .txt files. For beginners, you can use this as an initial text editor but later you
can switch to other better editors. The file(s) used should be saved with .html or .htm
extension.
2. NOTEPAD++
Notepad++ is another simple text editor which you can download and then install to use for
editing HTML files. The file(s) used should be saved with .html or .htm extension.
3. SUBLIME TEXT EDITOR
Sublime is a special HTML text editor. It is specially designed to create and edit HTML
files. It comes with various functionalities and plugins. The file(s) used should be saved
with .html or .htm extension.
4. VISUAL STUDIO CODE
Visual Studio Code is a special HTML text editor which can create and edit HTML files.
It comes with various functionalities and extensions. It is one of the best text editors for
coding and development. The file(s) used should be saved with .html or .htm extension.
DIFFERENCE BETWEEN HTML AND HTML5
HTML HTML 5
1. Does not allow JavaScript to run in Allows JavaScript to run in background.
browser.
2. It does not allow drag and drop It allows drag and drop effects.
effects.
3. It works with all old browsers. It supported by all new browser like Firefox,
Mozilla, Chrome, Safari, etc.
4. Older version of HTML are less HTML5 language is more mobile-friendly.
mobile-friendly.
5. Elements like nav, header were not New element for web structure like nav,
present. header, footer etc.
6. Doctype declaration is too long and Doctype declaration is quite simple and easy.
complicated.
7. <HTML>, <Body> , and <Head> These tags can be omitted while writing
tags are mandatory while writing a HTML code.
HTML code.
8. Not possible to draw shapes like HTML5 allows to draw shapes like circle,
circle, rectangle, triangle etc. rectangle, triangle etc.
9. It didn’t support audio and video It supports audio and video controls with the
without the use of flash player use of <audio> and <video> tags.
support.
REFERENCE