Sublime / vscode quick implementation of generating HTML code

Sublime / vscode quick implementation of generating HTML code

Basic HTML structure

Input !+Enter

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    
</body>
</html>

Generate shortcut keys for div plus class name

Input div.list>div.item_$*6

<div class="list">
    <div class="item_1"></div>
    <div class="item_2"></div>
    <div class="item_3"></div>
    <div class="item_4"></div>
    <div class="item_5"></div>
    <div class="item_6"></div>
</div>

Div with class name

Enter div.wrapper

<div class="wrapper"></div>

div with id

div#wrapper

<div id="wrapper"></div>

property[]

span[title="test"]

<span title="test"></span>

Descendants>

Type div>span>a

<div><span><a href=""></a></span></div>

Brothers+

div+p+span

<div></div>
<p></p>
<span></span>

Superior^

div>span^i

<div><span></span></div>
<i></i>

multiplication*

ul>li*2

<ul>
    <li></li>
    <li></li>
</ul>

text{}

div>span{this is test}

<div><span>this is test</span></div>

Self-increment symbol $

ul>li.list_${list $}*3

<ul>
    <li class="list_1">list 1</li>
    <li class="list_2">list 2</li>
    <li class="list_3">list 3</li>
</ul>

ul>li.item$@3*3 “@3” (indicates counting starts from 3)

<ul>
    <li class="item3">list 1</li>
    <li class="item4">list 2</li>
    <li class="item5">list 3</li>
</ul>

Implicit Conversion

.class

<div class="class"></div>

ul>.item

<ul>
    <li class="item"></li>
</ul>

table>.row>.col

<table>
    <tr class="row">
        <td class="col"></td>
    </tr>
</table>

This is the end of this article about how to quickly generate HTML code in Sublime/VSCode. For more information about how to quickly generate HTML in VSCode, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

<<:  Sample code for displaying a scroll bar after the HTML page is zoomed out

>>:  Implementation of HTML sliding floating ball menu effect

Recommend

Example code for implementing the wavy water ball effect using CSS

Today I learned a new CSS special effect, the wav...

Vue detailed introductory notes

Table of contents 1. Introduction 2. Initial Vue ...

An IE crash bug

Copy code The code is as follows: <style type=...

How to use display:olck/none to create a menu bar

The effect of completing a menu bar through displ...

Vue implements verification whether the username is available

This article example shares the specific code of ...

Summary of uncommon operators and operators in js

Summary of common operators and operators in java...

Several methods to execute sql files under mysql command line

Table of contents The first method: When the MySQ...

Introduction to Docker containers

Docker Overview Docker is an open source software...

Detailed explanation of various ways to merge javascript objects

Table of contents Various ways to merge objects (...

Steps to install MySQL using Docker under Linux

As a tester, you may often need to install some s...

Detailed explanation of the usage of MySQL memory tables and temporary tables

Usage of MySQL memory tables and temporary tables...

SQL Aggregation, Grouping, and Sorting

Table of contents 1. Aggregate Query 1. COUNT fun...

element-ui Mark the coordinate points after uploading the picture

What is element-ui element-ui is a desktop compon...

How to operate Linux file and folder permissions

Linux file permissions First, let's check the...

Meta tags in simple terms

The META tag, commonly referred to as the tag, is...