HTML Tutorials for beginners with HTML5. Learn HTML from beginning with latest HTML5 web standards and live code examples.
What is a Markup Language?
HTML is used in following applications.
- Website Designing and Development
- Emailers Designing
- Hybrid Applications (like VS Code)
HTML is a markup language, as it contains markup tags or tags. HTML Tags are used to build structure of a webpage like paragraphs, headings, tables, lists, buttons, forms, images, audio, video etc.
HTML build the structure of web pages. It is also known as Building Block of a website. Browsers interpret html tags and render content. HTML is Browser Interpreted language, thus load fast as compilation is not required.
- HTML is not a programming language.
- HTML can build Websites, emails and Hybrid Apps.
- World's First Web site was created on 12 Mar 1989 using html only. World's first website.
- HTML comes under SGML.
HTML was invented by a CERN scientist Tim Berners-Lee in 1989. The primary purpose to invent HTML was to share information on web for Research Scientists and Engineers so that other professionals in same domain can have access to your research work. Writing Books and Journals are only limited to some people. To run html, a web browser WorldWideWeb was developed, but later on it was renamed to Nexus.
Tim Berners-Lee's Inventions
- Web Server
- WorldWideWeb Browser
Visit World's First Website
W3C is the organization who build web standards for the development of World Wide Web. W3C was founded by Tim Berners-Lee in Oct 1994. Tim Berners-Lee is also the current CEO of W3C. To check a webpage standards, we use W3C Validator.
WHATWG or Web Hypertext Application Technology Working Group is a community that develops & maintains web standards including HTML and DOM. WHATWG was founded in 2004 by members of Apple, Mozilla and Opera. Currently Google and Microsoft are also members of WHATWG.
World Wide Web facts
- There are 1.8 Billions+ websites on www.
- Archie was the first search engine.
- First image on web was published on 1992.
- China is no 1 on web surfers list.
- India is second country on most web surfers list.
HTML was first formed in 1991. Till now, HTML receive many updates. Here is a list of HTML versions with release date.
Its recommended to use HTML5 versions for all websites now.
HTML Editor is the software used to write html code. A web browser is used to view webpage. Some Popular code editors are notepad++, Brackets, sublime text, atom, and Visual Studio Code etc. You can use any one of them.
List of Top HTML Editors
|VS Code ( by Microsoft)||Windows / Mac / Linux||Open Source|
|Brackets (by Adobe)||Windows / Mac / Linux||Open Source|
|Atom ( by Github)||Windows / Mac / Linux||Open Source|
|Sublime Text||Windows / Mac / Linux||Open Source / Paid|
|Dreamweaver||Windows / Mac||Licensed|
To build a webpage using html, use following steps. These steps are based on HTML5 web standards. Just follow these simple steps, and your first html page is ready, with W3C Standards.
- Open code editor.
- Create the doctype of webpage. e.g. <!doctype html>
- Create Parent html tag e.g. <html> </html>
- Create head tag inside html tag, e.g. <head> </head>
- Create body tag after head tag closing, e.g. <body> </body>
- Add title tag inside head, e.g. <title> </title>
- Add meta tag inside head, e.g. <meta charset="utf-8">
- Save page as index.html file on your system.
- Double Click the file and your webpage is live on browser.
- To edit webpage, right click on html file and select open in editor.
Sample HTML Page
<!doctype html> <html lang="en"> <head> <title>Webpage Title</title> <meta charset="UTF-8"> </head> <body> </body> </html>
In body tag, add some text, for example, Hello HTML.
<!DOCTYPE html> <html lang="en"> <head> <title>Hello HTML</title> <meta charset="UTF-8"> </head> <body> Hello HTML </body> </html>
HTML5 recommended structure
This is the recommended Html5 structure used in modern websites including responsive websites.
To autocomplete this structure, use html:5 in VS CODE and press enter or tab key.
<!DOCTYPE html> <html lang="en"> <head> <title>Hello HTML</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> </head> <body> Hello HTML </body> </html>
HTML Tags are used to build components in a webpage. Everything in a webpage is create by HTML Tags. Here are some popular HTML Tags and their use.
|<html>||HTML Tag is the parent tag or root tag of a webpage.|
|<head>||Head Tag is first child of html tag and is used to write the information for web browsers and Search engines.|
|<title>||Title tag is used only once inside head tag. Title is always displayed in browsers tab. Title is also use-use full for search engines to know about the webpage. Its max character limit is 60-70. Title should be unique for every webpage.|
|<meta>||Meta tag is used to define the charset family, description, keywords, Author, robots and Geo Location of a website.|
|<body>||Body tag is used to create the page structure or content. Structure includes Headings, Paragraphs, images, tables, division, etc of the website. Body includes all the content which users see on a website.|
Know more about HTML Tags
Overall, there are 145 Standard Tags in HTML5. These tags will be explained one by one in our next articles. To View Full List, Click Here, HTML Tags List
HTML Attributes are used to add extra information to an HTML Element. Attributes are used in start tag. Only a single attribute is allowed once. Attribute repetition is not allowed. Here are some popular HTML Attributes.
|class|| group single or multiple elements.
|id|| Set unique id of single element.
|title|| Tooltip of an element. Shows title content on mouseover.
|type||Specific type of html Elements.
|src||Source of media elements like images, iframes, Audio, Video.
|href||Hypertext Reference of Hyperlinks or Link Tag.
See all HTML Attributes.
An HTML page is always started with doctype first. HTML doctype is not a tag. Doctype define the html version to browsers, search engines and W3C validator with DTD. HTML Doctype
HTML Comments are used to write messages or notifications for web developers. Comments are started with
<!-- and ends with
-->. These comments are not visible in browsers, but remain in page source code.
<!-- HTML Comment -->
Try HTML Online Editor to quickly check your html output while typing.
The output in online editor and web browser may very. Please run html file in web browser for actual output of code.