W3C standard induction

Keywords: Javascript Front-end Vue Vue.js

W3C standard induction

reference resources: https://www.w3cschool.cn/xuexiw3c/xuexiw3c-standards.html

1. Discard font label

In the future, we will discard the font tag. The new page should not appear again. For example, the existing old page should also be replaced as much as possible during modification. Alternative method: < span class = "red_tex”></span>.

2. Standard XHTML header format

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="gb2312"> 
<head> 
    <meta charset="utf-8" /> 
    <title>W3Cschool - Learn technology, check data, from w3cschool start!</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="renderer" content="webkit" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="keywords" content="w3cschool,w3cschool Online tutorial,Technical documentation,Introduction to programming,W3Cschool,W3C,HTML,HTML5,CSS,Javascript,jQuery,Bootstrap,PHP,Java,Sql" />
    <meta name="description" content="w3cschool Is a professional programming introductory learning and technical document query website, including HTML,CSS,Javascript,jQuery,C,PHP,Java,Python,Sql,Mysql And other programming languages and open source technology online tutorials and user manuals, which are similar to foreign countries W3Cschool of W3C Learning community and rookie programming platform." />
</head>

DOCTYPE declarations have three formats:

i) Transitional: it requires a very loose DTD, which allows you to continue to use the identity of HTML4.01 (but in accordance with the writing of xhtml).
The complete code is as follows:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

ii) strict: for strict DTD s, you cannot use any presentation layer identification and attributes, such as

The complete code is as follows:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

iii) frameset: a DTD specially used for frame page design. If your page contains a frame, you need to use this DTD.
The complete code is as follows:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

Note: DOCTYPE declaration must be placed at the top of every XHTML document, above all codes and logos.

3. Javascript definition

<script language="javascript" type="text/javascript"> </script> 

4. CSS definition

<style type="text/css" media="screen"> </style>

5. Do not use '–' in comment content

This is not valid:

<!--Here are the notes-----------Here are the notes-->

6. All tag element and attribute names must be lowercase

Unlike HTML, XHTML is case sensitive, < title > and < title > are different tags.

7. All attributes must be enclosed in quotation marks' '

< height = 80 > is modified to: < height = "80" >

8. All < and & special symbols are coded

Any less than sign (<), which is not part of the label, must be encoded as & lt
Any greater than sign (>) that is not part of the label must be encoded as & gt
Any &, which is not part of an entity, must be encoded as & amp

Error:
http://club.china.alibaba.com/forum/thread/search_forum.html?action=SearchForum&doSearchForum=true&main=1&catcount=10&keywords=mp3 
correct:
http://club.china.alibaba.com/forum/thread/search_forum.html?action=SearchForum&amp;doSearchForum=true&amp;main=1&amp;catcount=10&amp;keywords=mp3

9. Assign a value to all attributes

<td nowrap><input type="checkbox" name="shirt" value="medium" checked>Must be modified to:
<td nowrap="nowrap"><input type="checkbox" name="shirt" value="medium" checked="checked" />

10. All tags must have a corresponding end tag

<br /> 
<img height="80" alt="Webpage" title="Web page src="logo.gif" width="200" />

11. All tags must be nested properly

<p><b></p></b>Must be modified to:<p><b></b></p> 

12. Add meaningful alt attribute to the picture

<img src="logo.gif" width="100" height="100" align="middle" boder="0" alt="w3cschool" />

13. Add label in the form to increase user friendliness

<form action="http://somesite.com/prog/adduser" method="post">
  <label for="firstname">first name: </label>
  <input type="text" id="firstname" />
  <label for="lastname">last name: </label>
  <input type="text" id="lastname" />
</form>

Posted by zingbats on Wed, 24 Nov 2021 00:54:35 -0800