


I just learned web design. When I was learning HTML, I made a page and put pet information on it. However, it looks normal on a 14.6-inch notebook, but distorted when viewed on a 19-inch monitor.
If it is corrected, it will look normal on a 19-inch monitor, but it will look awkward when you hold it on a laptop. Is there any function or label that can automatically change the size as the monitor changes?
The code is as follows:
<html> <head> <title>我的宠物</title> </head> <body bgcolor="#cyan"> <p> <img src="/static/imghwm/default1.png" data-src="image/1.png" class="lazy" style="max-width:90%" style="max-width:90%" alt="Newcomer asked: The display effects of different sizes of monitors in HTML are different. How to solve the problem? _html/css_WEB-ITnose" > <!--这里放入一个banner--> </p> <br> <h2 id="p-Jerry-p"><p>Jerry</p></h2> <!--现在可以放入一张宠物的图像,使之右对齐--> <p> <img src="/static/imghwm/default1.png" data-src="image/宠物猫.jpg" class="lazy" style="max-width:90%" style="max-width:90%" border="4" align="right"/ alt="Newcomer asked: The display effects of different sizes of monitors in HTML are different. How to solve the problem? _html/css_WEB-ITnose" > </p> <p> 年龄:1.2岁<br> 最喜爱的食物:鱼,热狗<br> 特点:好动,活泼,上房下梁<br> <!--插入一条华丽的分割线--> <hr align="left" width="800" size="3" color="red"> <p align=center>更新宠物日志:</p> <!--再来一条华丽的分割线--> <hr align="left" width="800" size="3" color="red"> 2014年12月20号:<br> 今天的天气很好,所以带jerry去鱼梁河钓鱼,一路上,看到美丽的田边开满了<br> 花儿,天边的云,映着彩霞的分红,好美一副景象。 </p> </body></html>
The screenshot of the effect is as follows:
Reply to discussion (solution)
Sorry, the two pictures above are the effect of laptop. I put the wrong picture. The following is the effect of 19 monitor:
Try not to set w and h to fixed values. Instead, it is set as a percentage.
align="right"
The effect of this is that HTML and CSS are now separated. Your writing method is not good and is outdated. You should learn more about CSS.
Width and height should be proportional
Try to use % for width;
@media screen and (max-width: 480px){
}
@media screen and (max-width: 960px){
}
or define the style separately
align="right"
For this effect, html and css are now used Separate, your way of writing is not good and is outdated. You should learn more about CSS.
Try to use % for width;
@media screen and (max-width: 480px){
}
@media screen and (max-width: 960px) {
}
Or define the style separately
The traditional method is to center the outermost fixed-width box and leave backgrounds on the left and right.
You can also use responsive layout, use percentages for simple layouts, and use CSS3 media queries to restyle the complex ones.

HTMLtagsdefinethestructureofawebpage,whileattributesaddfunctionalityanddetails.1)Tagslike,,andoutlinethecontent'splacement.2)Attributessuchassrc,class,andstyleenhancetagsbyspecifyingimagesources,styling,andmore,improvingfunctionalityandappearance.

The future of HTML will develop in a more semantic, functional and modular direction. 1) Semanticization will make the tag describe the content more clearly, improving SEO and barrier-free access. 2) Functionalization will introduce new elements and attributes to meet user needs. 3) Modularity will support component development and improve code reusability.

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

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.

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.

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.

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

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


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

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 Chinese version
Chinese version, very easy to use

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Zend Studio 13.0.1
Powerful PHP integrated development environment

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool
