Web front-end basics-the use of common basic HTML tags

A static web page refers to a web page generated by the browser's interpretation and execution, and its main development technologies are HTML, CSS, and JavaScript.
HTML: Hypertext Markup Language, the main markup language used to write web pages on Intenret, responsible for the basic expression of web pages.
CSS: referred to as style sheet for short, is a computer language used to add styles (fonts, spacing, background, etc.) to structured documents (such as HTML documents), and is responsible for beautifying
pages.
JavaSript: is a descriptive scripting language responsible for the interaction between the server and the client.

Basic structure of HTML file

<html>//根控制标记(头)
   <head>//头控制标记(头)
     ...
   </head>头控制标记(尾)
   <body>
     ...网页显示区域(一般要实现的代码都在这里写)
   </body>
</html>//根控制标记(尾)

Common HTML tags

1. Line break< /br>
2. Paragraph
format:
<p >The content of the paragraph< /p>
<p align="alignment">...< /p>
Attribute name align
attribute value left (text left aligned, default), center (align the text in the center), right (align the text to the right)
3. Horizontal straight line <hr>
attribute name attribute value
size pixel px/percent% (the larger the attribute value, the thicker the line)
width pixel px (absolute setting, the length will not Change in response to the change of the window)
percentage% (relative setting, the length will change with the width of the window)
noshade (solid line)
4. Background color and text settings

< body bgcolor="背景色" text="文字颜色" >

Margins and line spacing of the overall page

< body leftmargin="像素px" topmargin="像素px" >

5. Title text settings
< h1 >…< /h1>
<h2 >…< /h2>
<h3 >…< /h3>
<h4 >…< /h4>
<h5 >…< /h5>
<h6 >…< /h6> Font size from <h1> to <h6> changes from large to small.
6. Physical character control mark

<b>...</b>粗体
<i>...</i>斜体
<s>...</s>删除线
<u>...</u>下划线
<sub>...</sub>下标(化学元素:二氧化碳等)
<sup>...</sup>上标(数学中:幂,平方等)

7. Rolling
Format:

<marquee> ... </marquee> 

Direction: <direction=#>
#=left, right ,up ,down (indicating up, down, left, right roll)
eg: move from right to left

<marquee direction=left></marquee>

Way <bihavior=#>
#=scroll, slide, alternate (cyclic scrolling, scroll only once, alternately scroll back and forth)
eg:

 <marquee behavior=scroll></marquee> 
 <marquee behavior=slide></marquee>
  <marquee behavior=alternate></marquee>

Rolling times <loop=#>
#= times (the value is an integer) if not specified, the loop will not stop (infinite)
eg:

<marquee loop=3 width=50% behavior=scroll></marquee>
 <marquee loop=3 width=50% behavior=slide></marquee> 
 <marquee loop=3 width=50% behavior=alternate></marquee>

Speed <scrollamount=#>
(The value of scrollamount is the length of each movement of the text, in pixels)

 <marquee scrollamount=15></marquee>

Delay <scrolldelay=#> The unit is milliseconds
eg:

<marquee scrolldelay=50 scrollamount=100></marquee>

8. Semantic character control

<address></address> 地址
<del></del> 删除(删除线)
<ins>...</ins> 修改(下滑线)
<strong></strong> 加强语气(加粗)
<em>...</em> 加强语气(倾斜)

9. Format

<pre>...</pre>

10. Area <height=# width=#>

<marquee height=40 width=50% bgcolor=aaeeaa></marquee>

11. Background color <bgcolor=#>
#=hexadecimal number, or predefined color: Black, Olive, Teal, Red, Blue, Fuchsia, White, Green, Purple, Silver, Yellow, Aqua

<marquee bgcolor=aaaaee></marquee>

Guess you like

Origin blog.csdn.net/haha_7/article/details/108858259