HTML tags
HTML documents are text files that consist of HTML elements, which are predefined HTML tags that are in use. HTML tags usually appear in pairs, such as <b> and </b>. The first one of a pair of tags is the start tag, the second is the end tag, and the text between the start and end tags is the element content. HTML tags are case-insensitive,<b> is the same as the <B> representation.
Note Label <!--This is a comment-
The text between
The text between the <title> and </title> tags is the document title, which is displayed in the title bar of the browser window
Text between <body> and </body> tags is the body and will be displayed in the browser
<p> and </p> define paragraphs, and HTML automatically adds a blank line before and after a paragraph.
<br> tags can be forced to line up no matter where they are placed. The <br> tag is an empty tag and it has no end tag.
The text between the <b> and </b> tags is displayed in bold font.
Label Properties
Tag properties provide additional information for HTML elements on the page, typically appended to the start tag of an HTML element, and are represented by a pair of property names and values, like this: Name= "value". Attribute values should be enclosed in quotation marks, and double quotes are the most common, but single quotes can also be used. In rare cases, such as the attribute value itself contains quotation marks, it is necessary to use single quotation marks, such as: Name= ' John ' shotgun ' Nelson '. For example, label <body> defines the BODY element of an HTML page. Using an additional bgcolor property, you can tell the browser that the background color of your page is red, like this: <body bgcolor= "Red" >.
character entity
in HTML, Some characters have special meanings, such as the less than sign "<" is defined as the beginning of an HTML tag. If we want the browser to display these characters, we must insert the character entities in the HTML code. a character entity has three parts: an ampersand (&), an entity name or an entity number, and finally a semicolon (;) ; To display a less-than sign in an HTML document, we have to write:< or & #60; Note: The entity name is case-sensitive. In HTML, the most common character entities are non-detachable spaces. Typically, HTML merges spaces in your document. If you write 10 consecutive spaces in your HTML text, 9 of them will be removed. To insert a space in HTML, you can use the entity: ; .
html link
label <a> used to create a link-point anchor, The href property is used to specify the address to connect to, and the anchor's Start tab <a> and end tag </a> middle section will be displayed as hyperlinks. Using the Target property, you can define where to open the link address, and the following code opens a new browser window to open the link: <a href= "http://www.baidu.com" target= "_ Blank ">baidu</a></p>. The name property is used to create a named anchor. With a named anchor, you can let the link jump directly to a section of a page without the user opening that page and then looking slowly from top to bottom. To link directly to the "Tips" section, add a "#" to the URL and the anchor name, like this: <a name= "Http://www.w3schools.com/html_links.asp#tips" >jump To the useful Tips section</a>; a named anchor that links to a section of this page is written like this: <a name= "#tips" >jump to the useful Tips section</a& gt;.
html framework
Using frames, You can display more than one HTML document in a single browser window. Such HTML documents are called frame pages , and they are independent of each other. The downside to using frames is that Web developers need to be concerned about more HTML documents, and it can be difficult to print the entire page. The
frameset Label:<frameset> tag defines how the window is split into frames, each frameset tag defines a set of rows and columns, and the row/column values indicate the size of each row/column on the screen. The
frame Label:<frame> tag defines what files are placed in each frame. If you do not want to change the size of the user, you can add: noresize= "Noresize" in the <frame> tag.
html table
<table> tags define an HTML table, a simple HTML table consists of a TABLE element and one or more tr, TH, or TD elements, a TR element defines a table row, an th element defines a table header, and a TD element defines a table cell . The table is divided into rows (using <tr> tags), and each row is divided into data cells (using <td> tags). TD represents "Tabular data" (Tabledata), which is the contents of a data cell. Data cells can contain text, images, lists, paragraphs, forms, horizontal lines, tables, and so on. If you do not specify the border property, the table will not display a border . Sometimes this is useful, but most of the time we want to show the border. You can include non-separated spaces in empty cells to occupy a position so that the border can be displayed normally. Use the To support cells with no content .
HTML form
Form elements are elements that allow users to enter information into a form (such as text boxes, password boxes, drop-down menus, radio boxes, checkboxes, and so on). Forms are defined with the <form> element .
HTML images
In HTML, the image is defined by the tag . is an empty label, which has only attributes and no end tag. To display an image on a page, you need to use the SRC attribute. "src" means "source". The value of the src attribute is the URL of the image you want to display. The alt attribute is used to display an "interactive text" for an image. The value of the ALT attribute is user-defined. The Alt attribute tells the user the missing information when the browser loads the image, and the browser displays this "interactive text" instead of the image. It is a good practice to add ALT attributes to the images on the page, which helps to better display the information and is useful for plain text browsers.
HTML background
The <body> tag has two properties to specify the background. The background can be a color, or it can be an image.
The bgcolor property sets the background to a color, and its value can be a hexadecimal number, an RGB value, or a color name. All three statements above can set the page background to black.
- <body bgcolor= "#000000" >
- <body bgcolor= "RGB (0,0,0)" >
- <body bgcolor= "BLACK" >
The Background property sets the background to an image whose value is the URL address (relative or absolute) of the image you want to use. If the size of this image is less than the browser window, it fills the window with tiles.
- <body background= "Clouds.gif" >
- <body background= "Http://www.w3schools.com/clouds.gif" >
The bgcolor, background, and text properties of the <body> tags have been deprecated in the latest HTML standards (HTML4 and XHTML). These properties have been removed from the list in their recommendations. In future versions of HTML, cascading style sheets (CSS) are used to define the layout and display properties of HTML elements. Background images are rarely used in general websites. The most common background colors are black, white, and gray .
HTML Learning Notes