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,
Code:
html> <meta> <title>Page Title</title> <h1>This is a Heading</h1> <p>This is a paragraph.</p> <p>This is another paragraph.</p>
Output:
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.
defines the most important tag and defines the less important tag.
Sample HTML code with headings as below:
<h1> This is heading 1 </h1> <h2> This is heading 2 </h2> <h3> This is heading 3 </h3> <h4> This is heading 4 </h4>
Output:
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>
Output:
4. HTML images
HTML images is an HTML element defined with a tag , 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%">
Output:
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:
- Coffee
- Tea
- Milk
Output:
6. Create table
HTML table is an HTML element, and it can be defined using tag
and code as below:
Code:
Output: 7. Mention linkHTML 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> Output: 8. Style attributeHTML 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> Output: 9. lang attributeIn 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: ... ... Output: 10. Format HTML elementsIn 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> Output: Intermediate HTML CommandsThe intermediate commands are as follows: 1. Highlight TextIn 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> html <mark> Marked </mark> formtting </h2> Output: 2. Delete textIn HTML, we can delete some text using <p> My favorite color is <del> Navy blue </del> Red </p> Output: 3. Define superscripted textIn 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> Output: 4. Define abbreviationIn 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> Output: 5. Mention AddressIn 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> Output: Advanced HTML CommandsThe advanced commands are as follows: 1. Display a webpage inside a webpageIn 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> 2. Target different targets using iframeIn 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> Tips and Tricks to Use HTML Commands
ConclusionFinally, 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!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The web page structure needs to be supported by core HTML elements. 1. The overall structure of the page is composed of , , which is the root element, which stores meta information and displays the content; 2. The content organization relies on title (-), paragraph () and block tags (such as ,) to improve organizational structure and SEO; 3. Navigation is implemented through and implemented, commonly used organizations are linked and supplemented with aria-current attribute to enhance accessibility; 4. Form interaction involves , , and , to ensure the complete user input and submission functions. Proper use of these elements can improve page clarity, maintenance and search engine optimization.

When using HTML5SSE, the methods to deal with reconnection and errors include: 1. Understand the default reconnection mechanism. EventSource retrys 3 seconds after the connection is interrupted by default. You can customize the interval through the retry field; 2. Listen to the error event to deal with connection failure or parsing errors, distinguish error types and execute corresponding logic, such as network problems relying on automatic reconnection, server errors manually delay reconnection, and authentication failure refresh token; 3. Actively control the reconnection logic, such as manually closing and rebuilding the connection, setting the maximum number of retry times, combining navigator.onLine to judge network status to optimize the retry strategy. These measures can improve application stability and user experience.

Doctype is a statement that tells the browser which HTML standard to use to parse the page. Modern web pages only need to be written at the beginning of the HTML file. Its function is to ensure that the browser renders the page in standard mode rather than weird mode, and must be located on the first line, with no spaces or comments in front of it; there is only one correct way to write it, and it is not recommended to use old versions or other variants; other such as charset, viewport, etc. should be placed in part.

Client-sideformvalidationcanbedonewithoutJavaScriptbyusingHTMLattributes.1)Userequiredtoenforcemandatoryfields.2)ValidateemailsandURLswithtypeattributeslikeemailorurl,orusepatternwithregexforcustomformats.3)Limitvaluesusingmin,max,minlength,andmaxlen

Use tags in HTML to group options in the drop-down menu. The specific method is to wrap a group of elements and define the group name through the label attribute, such as: 1. Contains options such as apples, bananas, oranges, etc.; 2. Contains options such as carrots, broccoli, etc.; 3. Each is an independent group, and the options within the group are automatically indented. Notes include: ① No nesting is supported; ② The entire group can be disabled through the disabled attribute; ③ The style is restricted and needs to be beautified in combination with CSS or third-party libraries; plug-ins such as Select2 can be used to enhance functions.

To use HTML button elements to achieve clickable buttons, you must first master its basic usage and common precautions. 1. Create buttons with tags and define behaviors through type attributes (such as button, submit, reset), which is submitted by default; 2. Add interactive functions through JavaScript, which can be written inline or bind event listeners through ID to improve maintenance; 3. Use CSS to customize styles, including background color, border, rounded corners and hover/active status effects to enhance user experience; 4. Pay attention to common problems: make sure that the disabled attribute is not enabled, JS events are correctly bound, layout occlusion, and use the help of developer tools to troubleshoot exceptions. Master this

When using HTML5Geolocation API to obtain user location, you must first obtain user authorization, and request and explain the purpose at the right time; the basic method is navigator.geolocation.getCurrentPosition(), which contains successful callbacks, wrong callbacks and configuration parameters; common reasons for failure include permission denied, browser not supported, network problems, etc., alternative solutions and clear prompts should be provided. The specific suggestions are as follows: 1. Request permissions when the user operation is triggered, such as clicking the button; 2. Use enableHighAccuracy, timeout, maximumAge and other parameters to optimize the positioning effect; 3. Error handling should distinguish between different errors

Using HTML5 semantic tags and Microdata can improve SEO because it helps search engines better understand page structure and content meaning. 1. Use HTML5 semantic tags such as,,,, and to clarify the function of page blocks, which helps search engines establish a more accurate page model; 2. Add Microdata structured data to mark specific content, such as article author, release date, product price, etc., so that search engines can identify information types and use them for display of rich media summary; 3. Pay attention to the correct use of tags to avoid confusion, avoid duplicate tags, test the effectiveness of structured data, regularly update to adapt to changes in schema.org, and combine with other SEO means to optimize for long-term.
