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

How to use dl(dt,dd), ul(li), ol(li) in HTML

HTML <dl> Tag #Definition and Usage The <...

A brief discussion on the difference between src and href in HTML

Simply put, src means "I want to load this r...

Detailed explanation of Vite's new experience

What is Vite? (It’s a new toy on the front end) V...

Vue scaffolding learning project creation method

1. What is scaffolding? 1. Vue CLI Vue CLI is a c...

Sample code for separating the front-end and back-end using FastApi+Vue+LayUI

Table of contents Preface Project Design rear end...

JavaScript counts the number of times a character appears

This article example shares the specific code of ...

Troubleshooting ideas and solutions for high CPU usage in Linux systems

Preface As Linux operation and maintenance engine...

How to allow remote connection in MySql

How to allow remote connection in MySql To achiev...

MySQL column to row conversion and year-month grouping example

As shown below: SELECT count(DISTINCT(a.rect_id))...

Example of how to identify the user using a linux Bash script

It is often necessary to run commands with sudo i...

MySQL data types full analysis

Data Type: The basic rules that define what data ...

How to use @media in mobile adaptive styles

General mobile phone style: @media all and (orien...

js implements a simple countdown

This article example shares the specific code of ...