Introduction to HTML page source code layout_Powernode Java Academy

Introduction to HTML page source code layout_Powernode Java Academy

Introduction to HTML page source code layout

This introduction takes the screenshot of Google's homepage source code as an example:

From top to bottom:

<!DOCTYPE html> This tag tells the browser which HTML or XHTML specification the document uses.  

XHTML specification: must be lowercase, have start and end tags, and attributes must also be quoted in double quotes.  

HTML specification: not case-sensitive, has start and end tags, and the end tag can be placed inside the start tag, such as: <input type='text' />. Attributes can use double quotes or single quotes (must be used in pairs).

HTML node: The root node of the HTML page. The code information of the page is placed in this node.

<head> node: head node. Contains the following child nodes:

<mete> tag: provides meta-information of the page, such as page keywords;

<title> tag: the title of the page;

<script> tag: generally stores CSS and JavaScript codes;

<Body> node: page content area, storing html element information

<Div> tag: stores various element controls.

<script> tag: Because the HTML page is loaded from top to bottom, instead of displaying the contents all at once after loading, the contents are displayed while loading.

Putting Script after body is similar to indicating that the code in this Script will call the elements in body. If it is placed in the Head tag, when this script code is run, the elements in the body have not been loaded yet and the required element information cannot be obtained.

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

<<:  How to manage multiple projects on CentOS SVN server

>>:  MySQL 8.0.22 download, installation and configuration method graphic tutorial

Recommend

WeChat applet + ECharts to achieve dynamic refresh process record

Preface Recently I encountered a requirement, whi...

How to modify the default storage location of Docker images (solution)

Due to the initial partitioning of the system, th...

Use Docker to run multiple PHP versions on the server

PHP7 has been out for quite some time, and it is ...

WeChat applet implements a simple dice game

This article shares the specific code of the WeCh...

How to switch directories efficiently in Linux

When it comes to switching directories under Linu...

Detailed explanation of how two Node.js processes communicate

Table of contents Preface Communication between t...

Illustration-style website homepage design New trend in website design

You can see that their visual effects are very bea...

HTML mouse css control

Generally speaking, the mouse is displayed as an u...

A small question about the execution order of SQL in MySQL

I encountered a sql problem at work today, about ...

Commonplace talk about the usage of MYSQL pattern matching REGEXP and like

like LIKE requires the entire data to match, whil...

Optimizing JavaScript and CSS to improve website performance

<br /> In the first and second parts, we int...

MySQL 8.0.22 winx64 installation and configuration method graphic tutorial

The database installation tutorial of MySQL-8.0.2...

Solve the error "Can't locate ExtUtils/MakeMaker.pm in @INC"

When installing mha4mysql, the steps are roughly:...

Some ways to eliminate duplicate rows in MySQL

SQL statement /* Some methods of eliminating dupl...