search
HomeWeb Front-endHTML TutorialHTML study notes one

HTML study notes one

Apr 19, 2018 pm 02:29 PM
htmlstudynotes

The content of this article is about HTML learning notes 1, which has a certain reference value. Now I share it with everyone. Friends in need can refer to

Click to open the link to learn the summary.

Commonly used HTML tags and explanations

1. Basic format framework

<html>
<body>
<h1 id="标题">标题</h1>
<p>段落</p>
</body>
</html>


2. Text formatting tags

<b>粗体</b>
<big>大号字</big>
<em>着重字(粗)</em>
<i>斜体字</i>
<strong>加强语气(粗)</strong>
<sub>下标</sub>
<sup>上标</sup>
<ins>插入字</ins>
<del>删除字</del>


3. Link

<a href="URL" target="_blank"> this is a link </a>


Among them, href=hyperlink, target="_blank" means in Open the file in a new window.

Note that there is a space between the two.

There is a special case where the name attribute is used, which can jump to the anchor defined by the name attribute.

<a name="tips">基本的注意事项 - 有用的提示</a>
.
.
.
<a href="#tips">跳转到tips标签处</a>

Note that when citing anchors, add # in front of the name.


4. Image

<img src="/static/imghwm/default1.png"  data-src="boat.gif"  class="lazy"   alt="Big Boat"    style="max-width:90%"  style="max-width:90%" />

Among them, src stores the address of the image;

alt attribute Represents replacement text, that is, the text description displayed when the image cannot be loaded;

width and height are used to set the length and width of the image;

In addition, the image also has an attribute border for Specifies the width of the image border.


5. General method of changing attributes - style

<body style="background-color:yellow">
<h2 style="font-family:arial;color:red;font-size:20px;text-align:center;">
标题
</h2>
</body>

Among them, background-color is used Used to set the background color;

font-family is used to set the font;

color is used to set the (title) font color;

font-size is used to set Font size;

text-align: center.


6. Quote

The first type: is equivalent to "".

<q>所要引用的话</q>


The second type: long quotation, automatic indentation, cite indicates the source address (can be omitted).

<blockquote cite="URL">......</blockquote>


The third type: abbreviation. Putting the mouse on the abbreviation will display the complete content, that is, title.

<abbr title="world health organization">WHO</abbr>

The fourth type: address (contact information), automatically italicized, and automatically added line breaks before and after.

<br/>
<address>我是地址</address>

The fifth type: the title of the work, automatic italics.

<cite>老人与海</cite>



Special, two-way rewriting, dir="rtl" means writing from right to left

<bdo dir="rtl">从右向左</bdo>


7. Computer code

<kbd>键盘输入</kbd>
<samp>计算机输出示例</samp>
<code>代码</code>
<pre class="brush:php;toolbar:false">文本
数学公式


Among them, the first three do not retain spaces and line breaks. If you want to keep For the original format of the text, please use the fourth format,

 to retain line breaks. <p><br></p><p>8. Create an image map<br></p><pre class='brush:php;toolbar:false;'><html>
<body>

<p>请点击图像上的星球,把它们放大。</p>

<img src="/static/imghwm/default1.png"  data-src="/i/eg_planets.jpg"  class="lazy"
border="0" usemap="#planetmap"
alt="Planets" />

<map name="planetmap" id="planetmap">

<area
shape="circle"
coords="180,139,14"
href ="/example/html/venus.html"
target ="_blank"
alt="Venus" />

<area
shape="rect"
coords="0,0,110,260"
href ="/example/html/sun.html"
target ="_blank"
alt="Sun" />

</map>

</body>
</html>


Among them, defines the image map, including The id and name attributes generally need to be defined;

defines the clickable area of ​​the image map, including attributes:
          Shape specifies the shape of the area

              coords Specify the (x,y) coordinates of the area, the upper left corner is (0,0); for example (x,y,z), xy represents the center of the circle, z represents the radius


The usemap attribute in



##HTML study notes one refers to the id or name attribute in the map.


9. Others




# #
-------Line break


-------Horizontal line

---------Comments

The above is the detailed content of HTML study notes one. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Why are HTML attributes important for web development?Why are HTML attributes important for web development?May 12, 2025 am 12:01 AM

HTMLattributesarecrucialinwebdevelopmentforcontrollingbehavior,appearance,andfunctionality.Theyenhanceinteractivity,accessibility,andSEO.Forexample,thesrcattributeintagsimpactsSEO,whileonclickintagsaddsinteractivity.Touseattributeseffectively:1)Usese

What is the purpose of the alt attribute? Why is it important?What is the purpose of the alt attribute? Why is it important?May 11, 2025 am 12:01 AM

The alt attribute is an important part of the tag in HTML and is used to provide alternative text for images. 1. When the image cannot be loaded, the text in the alt attribute will be displayed to improve the user experience. 2. Screen readers use the alt attribute to help visually impaired users understand the content of the picture. 3. Search engines index text in the alt attribute to improve the SEO ranking of web pages.

HTML, CSS, and JavaScript: Examples and Practical ApplicationsHTML, CSS, and JavaScript: Examples and Practical ApplicationsMay 09, 2025 am 12:01 AM

The roles of HTML, CSS and JavaScript in web development are: 1. HTML is used to build web page structure; 2. CSS is used to beautify the appearance of web pages; 3. JavaScript is used to achieve dynamic interaction. Through tags, styles and scripts, these three together build the core functions of modern web pages.

How do you set the lang attribute on the  tag? Why is this important?How do you set the lang attribute on the tag? Why is this important?May 08, 2025 am 12:03 AM

Setting the lang attributes of a tag is a key step in optimizing web accessibility and SEO. 1) Set the lang attribute in the tag, such as. 2) In multilingual content, set lang attributes for different language parts, such as. 3) Use language codes that comply with ISO639-1 standards, such as "en", "fr", "zh", etc. Correctly setting the lang attribute can improve the accessibility of web pages and search engine rankings.

What is the purpose of HTML attributes?What is the purpose of HTML attributes?May 07, 2025 am 12:01 AM

HTMLattributesareessentialforenhancingwebelements'functionalityandappearance.Theyaddinformationtodefinebehavior,appearance,andinteraction,makingwebsitesinteractive,responsive,andvisuallyappealing.Attributeslikesrc,href,class,type,anddisabledtransform

How do you create a list in HTML?How do you create a list in HTML?May 06, 2025 am 12:01 AM

TocreatealistinHTML,useforunorderedlistsandfororderedlists:1)Forunorderedlists,wrapitemsinanduseforeachitem,renderingasabulletedlist.2)Fororderedlists,useandfornumberedlists,customizablewiththetypeattributefordifferentnumberingstyles.

HTML in Action: Examples of Website StructureHTML in Action: Examples of Website StructureMay 05, 2025 am 12:03 AM

HTML is used to build websites with clear structure. 1) Use tags such as, and define the website structure. 2) Examples show the structure of blogs and e-commerce websites. 3) Avoid common mistakes such as incorrect label nesting. 4) Optimize performance by reducing HTTP requests and using semantic tags.

How do you insert an image into an HTML page?How do you insert an image into an HTML page?May 04, 2025 am 12:02 AM

ToinsertanimageintoanHTMLpage,usethetagwithsrcandaltattributes.1)UsealttextforaccessibilityandSEO.2)Implementsrcsetforresponsiveimages.3)Applylazyloadingwithloading="lazy"tooptimizeperformance.4)OptimizeimagesusingtoolslikeImageOptimtoreduc

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version