
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
HTML Basics
Hypertext refers to the way in which Web pages (HTML documents) are linked together. Thus, the link available on a web page is called Hypertext. As its name suggests, HTML is a Markup Language which means you use HTML to simply "mark-up" a text document with tags that tell a Web browser how to structure it to display. It stands for Hypertext Markup Language, and it is the most widely used language to write Web Pages.
HTML5 is the next major revision of the HTML standard superseding HTML 4.01, XHTML 1.0, and XHTML 1.1. HTML5 is a standard for structuring and presenting content on the World Wide Web. The new standard incorporates features like video playback and drag-and-drop that have been previously dependent on third-party browser plug-ins such as Adobe Flash, Microsoft Silverlight, and Google Gears.
HTML Doctype
Whenever you create an HTML document, the doctype is the first thing placed in the document. It conveys the web browser about the version of the HTML, this page is written on. It is not case-sensitive.
The HTML5 doctype
<!DOCTYPE html>
HTML Character Encoding
The charset attribute in HTML is used with the <meta> to specify the character encoding.
Following is the syntax −
<meta charset="char_set">
Above, char_set is the character set to specify the character encoding of an HTML document.
Let us now see an example to specify character encoding −
Example
<!DOCTYPE html> <html> <head> <meta charset = "UTF-8"> </head> <body> <h2>Example</h2> <p>We have added demo text:<p> <textarea rows = "4" cols = "50"> Here, we are mentioned the demo content. This is just to display an example of charset in an HTML document. </textarea><br> <button type = "button">Previous</button> <button type = "button">Next</button> </body> </html>
Output
HTML Headings
Any document starts with a heading. You can use different sizes for your headings. HTML also has six levels of headings, which use the elements <h1>, <h2>, <h3>, <h4>, <h5>, and <h6>. While displaying any heading, browser adds one line before and one line after that heading.
HTML Elements
An HTML element is defined by a starting tag. If the element contains other content, it ends with a closing tag, where the element name is preceded by a forward slash
HTML Attributes
An attribute is used to define the characteristics of an HTML element and is placed inside the element's opening tag. All attributes are made up of two parts − a name and a value. For example −
<canvas id=”newCanvas” width=”400” height=”300”>
Other examples include −
<img alt = ”alternate text”>
Including quotes around an attribute is not mandatory, according to HTML5 standard, but it’s always a good practice to include quotes.
HTML Formatting
Formatting means how we can format text on a web page in an HTML. It includes bold text, italic text, strike text, highlight a text, etc. Let us see an example −
Example
<!DOCTYPE html> <html> <body> <h2>Tags for formatting text in HTML</h2> <strong>Strong text</strong><br> <b>Bold text</b><br> <em>Emphasized text</em><br> <i>Italic Text</i><br> <mark>Highlighted text</mark> </body> </html>
Output
HTML Comments
HTML comments are placed in between <!-- … --> tags. So, any content placed with-in <!-- … --> tags will be treated as a comment and will be completely ignored by the browser.
- Related Articles
- HTML Canvas Basics
- Microcomputer Basics
- Microprocessor Basics
- Microcontroller Basics
- PHP Variable Basics
- Advanced JavaScript Backend Basics
- Basics of React.js Routing
- What are JavaScript basics?
- The Basics of Gastroparesis
- Exception Handling Basics in C++
- Basics of C++ Programming Language?
- What are Python OOP Basics?
- Basics of Three-Phase Electricity
- Electric Power Distribution System Basics
- Python Logging Basics - Simple Guide
