HTML headerLOGIN

HTML header

HTML header

There will be a <!DOCTYPE> statement at the beginning of the code.

<!DOCTYPE> statement helps the browser display the web page correctly.

<!DOCTYPE> Statement

There are many different documents in the Web world. Only by understanding the type of document can the browser display the document correctly.

HTML also has many different versions. Only by fully understanding the exact HTML version used in the page can the browser display the HTML page completely correctly. That's what <!DOCTYPE> is for.

<!DOCTYPE> is not an HTML tag. It provides the browser with a piece of information (a statement) about what version of the HTML was written.

All the following codes are between <head>...</head>. The specific contents are:

1.<title>…</title>

Title element helps users better identify files. <title> is necessary in HTML/XHTML documents. There is only one. Make the file name when used as homepage or collection.

2.<link>…</link>

Display the relationship between this document and other documents:<link rel="stylesheet" href="s.css" > Connections to external style sheets.

rel describes the relationship between the html file and the url document, and href describes the document name.

3.<style>…</style>

You can include style pages in the document. The internal styles of the document itself.

4.<base>…</base>

<base> tag describes the basic link address/link target. This tag serves as the base for all link tags in the HTML document. Default link:

5.<script>…</script>

is used to contain scripts (a series of commands written in a scripting language), which can be Javascript or VbScript.

6.<meta>…</meta>

meta tag describes some basic metadata. The

<meta> tag provides metadata. Metadata is also not displayed on the page, but will be parsed by the browser.

The META element is typically used to specify a web page's description, keywords, the file's last modification time, author, and other metadata.

Metadata can be used by browsers (how to display content or reload pages), search engines (keywords), or other web services.

<meta> is generally placed in the <head> area

<meta> tag - usage example

Define keywords for search engines:

<meta name="keywords" content="HTML, CSS, XML, XHTML, JavaScript">

Define description content for the web page:

<meta name="description" content="Free Web tutorials on HTML and CSS">

Define web author:

<meta name="author" content="Hege Refsnes">

Refresh the current page every 30 seconds:

<meta http-equiv="refresh" content="30">

实例:

<!DOCTYPE html>
<html>
<head>
<meta name="description" content="php html css" charset="utf-8">
<link rel="stylesheet" type="text/css" href="">
<script>
</script>
<title>标题测试</title>
<style type="text/css">
body {background-color:pink}
</style>
</head>
<body>
<a href="http://ask.php.cn/"  target="_blank" >这个是连接哦</a>
</body>
</html>
Next Section
<!DOCTYPE html> <html> <head> <meta name="description" content="php html css" charset="utf-8"> <link rel="stylesheet" type="text/css" href=""> <script> </script> <title>标题测试</title> <style type="text/css"> body {background-color:pink} </style> </head> <body> <a href="//m.sbmmt.com/" target="_blank" >这个是连接哦</a> </body> </html> 同学们可以试试其他的。
submitReset Code
ChapterCourseware