Table of Contents
Basic HTML Commands
1. Sample HTML document syntax
This is a Heading
2. HTML Headings
This is heading 4
3. HTML element paragraph
4. HTML images
5. Html Lists
6. Create table
7. Mention link
8. Style attribute
9. lang attribute
10. Format HTML elements
Intermediate HTML Commands
1. Highlight Text
html Marked formtting
2. Delete text
3. Define superscripted text
4. Define abbreviation
5. Mention Address
Advanced HTML Commands
1. Display a webpage inside a webpage
2. Target different targets using iframe
Tips and Tricks to Use HTML Commands
Conclusion

HTML Commands

Sep 04, 2024 pm 04:13 PM
html html5 HTML Tutorial HTML Properties HTML tags

HTML means Hyper Text Markup language, a standard markup language for web pages. HTML will have elements, attributes, and other tags. Most of the websites present on the internet use HTML. HTML is easy to learn and powerful. Hyper Text is the major method of moving around the web by clicking on Hyperlinks, which redirect to another page. Markup shows text inside them using HTML tags by marking a test as a certain type. HTML Command elements are building blocks of an HTML page and can have attributes that provide additional information about the element, and attributes will be present in pairs.

Basic HTML Commands

The basic commands are as follows:

1. Sample HTML document syntax

Sample HTML documents will have HTML elements which are building blocks of web pages, and some of the HTML elements are , which is a root element, which will have meta information,

which contains a title of the document and which includes data of the document.

Code:

html>

<meta>
<title>Page Title</title>

<h1 id="This-is-a-Heading">This is a Heading</h1>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>

Copy after login

Output:

HTML Commands

2. HTML Headings

HTML headings are HTML elements that are defined with tags

to

where

defines the most important tag and

defines the less important tag.

Sample HTML code with headings as below:

<h1 id="This-is-heading"> This is heading 1 </h1>
<h2 id="This-is-heading"> This is heading 2 </h2>
<h3 id="This-is-heading"> This is heading 3 </h3>
<h4 id="This-is-heading"> This is heading 4 </h4>
Copy after login

Output:

HTML Commands

3. HTML element paragraph

HTML paragraph is an HTML element that we define using the

tag, and the sample code is as follows:

<p> This is a paragraph </p>
<p> This is another paragraph </p>
Copy after login

Output:

HTML Commands

4. HTML images

HTML images is an HTML element defined with a tag HTML Commands, and we need to mention attributes such as src of the image, alt means alternative text, width, and height of the image to display, and sample code is

Code:

<img src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/article/000/000/000/172543763740047.jpg" class="lazy" alt="HTML Commands"   style="max-width:90%">
Copy after login

Output:

HTML Commands

5. Html Lists

HTML lists is an HTML elements and defined using tags

    or
    where
    is an unordered list and
    is an ordered list

    Code:

    Copy after login
    Copy after login
  • Coffee
  • Tea
  • Milk

Output:

HTML Commands

6. Create table

HTML table is an HTML element, and it can be defined using tag

and rows with tag and cells with tag
and code as below:

Code:

Copy after login
Copy after login
Firstname Lastname Age
Jill Smith 50

Output:

HTML Commands

HTML links are HTML elements, and they can be defined using the tag the sample code is below:

Code:

<a href="https://www.HTML%20Commands.com">This is a link </a>
Copy after login

Output:

HTML Commands

8. Style attribute

HTML attribute style can be used with a combination of any HTML elements such as

, and the sample code is as below:

Code:

<p style="color:red"> I am a paragraph </p>
Copy after login

Output:

HTML Commands

9. lang attribute

In HTML, using the lang attribute, we can declare the language of the document using the tag, and language is defined using the lang attribute, and sample code is as below:

Code:



...
...

Copy after login

Output:

HTML Commands

10. Format HTML elements

In HTML, we can use formatting elements to format the HTML document, and we can define special elements for text with special meaning. HTML elements like for bold, for italic

Code:

<b> This text is bold. </b>
Copy after login

Output:

HTML Commands

Intermediate HTML Commands

The intermediate commands are as follows:

1. Highlight Text

In HTML, we can highlight some text in an HTML document using element so that it highlights the text enclosed in element, and the sample code is as below:


<h2 id="html-mark-Marked-mark-formtting"> html <mark> Marked </mark> formtting </h2>

Copy after login

Output:

HTML Commands

2. Delete text

In HTML, we can delete some text using element so that the text which is enclosed between this element is deleted, and the sample code is as below:


<p> My favorite color is <del> Navy blue </del> Red </p>

Copy after login

Output:

HTML Commands

3. Define superscripted text

In HTML, we can define the text as superscripted using element in the HTML document so that text enclosed in element will be superscripted, and the sample code is as below:


<p> This is <sup> superscripted </sup> text </p>

Copy after login

Output:

HTML Commands

4. Define abbreviation

In HTML, we can define abbreviations by using the HTML element in the HTML document, which will give useful information to browsers, and the sample code is as below:


<p> The <abbr title="World Health Organization">WHO </abbr> was founded in 1948 </p>

Copy after login

Output:

HTML Commands

5. Mention Address

In HTML, we can mention the address in an HTML document using HTML element

, which defines contact information or address related to the article or document and displays in italics and the sample code as below:

<address>
Written by Srinivas <br>
dasu.com <br>
Pincode : 500084, Hyderabad <br>
India
</address>

Copy after login

Output:

HTML Commands

Advanced HTML Commands

The advanced commands are as follows:

1. Display a webpage inside a webpage

In HTML, we can display a webpage inside a webpage using HTML iframe, which is defined using the tag


<iframe src="demo.html" height="300" width="300"> </iframe>

Copy after login

2. Target different targets using iframe

In HTML, we can use the target frame as a link using the iframe tag in the HTML document, and the target attribute to the link must refer to the name attribute of the iframe and sample code is as below:


<iframe src="demo.html" name="iframe1"> </iframe>
<p> <a href="www.google.com" target="iframe1"> Google.co.in </a> </p>

Copy after login

Tips and Tricks to Use HTML Commands

  • Make your visitors change the text color or background by adding extra code.
  • Add metadata while writing an HTML document.
  • It’s good to hide some fields where we don’t want a user to edit them.
  • Always add a horizontal line to break long sections so the website will look good.

Conclusion

Finally, it’s all about different types of HTML commands of various levels are briefly discussed with examples. After reading this article, I hope you will have a good idea of how to use HTML commands.

The above is the detailed content of HTML Commands. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Table Border in HTML Table Border in HTML Sep 04, 2024 pm 04:49 PM

Guide to Table Border in HTML. Here we discuss multiple ways for defining table-border with examples of the Table Border in HTML.

Nested Table in HTML Nested Table in HTML Sep 04, 2024 pm 04:49 PM

This is a guide to Nested Table in HTML. Here we discuss how to create a table within the table along with the respective examples.

HTML margin-left HTML margin-left Sep 04, 2024 pm 04:48 PM

Guide to HTML margin-left. Here we discuss a brief overview on HTML margin-left and its Examples along with its Code Implementation.

HTML Table Layout HTML Table Layout Sep 04, 2024 pm 04:54 PM

Guide to HTML Table Layout. Here we discuss the Values of HTML Table Layout along with the examples and outputs n detail.

HTML Input Placeholder HTML Input Placeholder Sep 04, 2024 pm 04:54 PM

Guide to HTML Input Placeholder. Here we discuss the Examples of HTML Input Placeholder along with the codes and outputs.

HTML Ordered List HTML Ordered List Sep 04, 2024 pm 04:43 PM

Guide to the HTML Ordered List. Here we also discuss introduction of HTML Ordered list and types along with their example respectively

Moving Text in HTML Moving Text in HTML Sep 04, 2024 pm 04:45 PM

Guide to Moving Text in HTML. Here we discuss an introduction, how marquee tag work with syntax and examples to implement.

HTML onclick Button HTML onclick Button Sep 04, 2024 pm 04:49 PM

Guide to HTML onclick Button. Here we discuss their introduction, working, examples and onclick Event in various events respectively.

See all articles