Markup Language - List_HTML/Xhtml_Web Page Production
Standardized Design Solutions - Markup Language and Style Manual
Web Standards Solutions
The Markup and Style Handbook
Part 1: Get Down With Markup
Let’s start with markup syntax
Chapter 1 Checklist
Checklists can be found on almost every page on the web.
A list of hyperlinks; a list of shopping cart items; a list of your favorite movies...even a navigation list for the entire website. It may seem to some people that building a list is arbitrary, but what we are going to explore is exactly how There are advantages and disadvantages to several common methods of creating lists and collections. Later, we will list a few examples of how to embellish a common list with their advantages and disadvantages.
Let’s go shopping
Initially, I planned to use a laundry list as an example for this chapter, but I soon realized that I had no idea what items should be included in such a list. , so...for the sake of examples, let’s use food as an example!
Let’s imagine that you need to put a food list on your website. You may be confused as to why you should put a food list on your website. Well, this may be off topic. We just need to Just a reason to start thinking about lists...
On the page, let's say we want the list to look like... well, like a list — a long vertical list with each item on its own line:
Apples
Spaghetti
Green Beans
Milk
Looks very simple, doesn’t it? Similar to many aspects of page design and development, we can achieve the same (or similar) effect through many different methods .As with all examples later in this book, I will use eXtensilble
Show all examples from a HyperText Markup Language (XHTML) perspective — and make sure that the chosen methods use correct markup syntax, as per World Wild
Various standards developed by the Web Consortium (W3C).
We can easily add a
Tags are done, or you can use various list item tags to complete the job. Now let’s look at 3 completely different methods and the characteristics of each method.
Question Time
Which of the following methods is best for building a grocery list?
Method A: Use
Line break
Apples
Spaghetti
Green Beans
Milk
Method A is indeed a widely used method, and may be used by millions of pages. In fact I'm sure all of us are guilty of using this method once in a while, right? We want each item in the list to be on its own line and include a newline tag (in this case using xhtml-compliant Standard self-closing tag
) will generate a line break after each item. This is all its effects. It seems to be quite useful.
But what if we want to add a different style to this food list than other page elements? For example: if we want the color of all links in the list to be red instead of the default blue What should we do if we want to change the color, or want to change the font size? Really we can't do anything, we are limited by the font style (if it is set) for the entire html document. At the same time, if Without any tags surrounding the list, we can't create a unique css rule for the list.
Wrap
If we add a line like "Five Foot Loaf of Anthony's Italian" to the list
"Bread". Depending on the position of this list on the page, if there is insufficient horizontal space or the viewer's browser window is narrow, items that are too long will run the risk of being folded to the next line.
At the same time, we also need to consider that users with poor vision may change the default font size to increase readability. We believe that items can be easily arranged in narrow columns as shown in Figure 1-1, but Most likely it will be like
Figure 1 - 2 In this way, line breaks occur in unexpected places. When readers increase the font size, the design style will completely change.
Hmm... Now, I think I should buy bread, but in pictures 1-2, the two lines of words on the bread are really confusing.
When using a small screen device such as a mobile phone or PDA to read long lines, similar line wrapping problems will show its ugly face. Hardcore technology enthusiasts may carry around a Palm to record shopping lists.
Pilot (rather than paper and pen in the traditional sense) was wandering around the supermarket when he ended up looking for something called "Anthony's Italian" on the shelves.
Here I want to make a point in essence - using method A does not take into account the variables that designers cannot control when reading web pages.
Method B: Biting dots
Most mature browsers will add a dot symbol to the left of the list item when parsing the
- and the other parent tag of
- is the
- (ordered list), which will be discussed more later.
- open!
Use
tag to simulate the correct display effect of an unordered list with word wrapping, but in fact we have a better way.
It has always been very important to develop the habit of writing correct tag syntax. By writing tag syntax correctly, we will not have to worry about problems caused by no closing tags or incorrect nested elements in the future. If anyone reads These source codes can also enable them to have a deeper understanding of the effects that the source code wants to achieve.
Remember to make good use of online detection tools to check the URI you submit or the document you upload. In the end, you will feel that it is worth it.
Method C: Close
- Apples
- Spaghetti
- Green Beans
- Milk
- tag because
- is a block-level element, so it can be removed from use
tag, so that each item occupies its own line, but we missed its outer structure and lacked an element that means "this group of items is a list!"
From a semantic point of view This issue is also very important — A list is a group of items that belong together, so we should add such tags to them. In addition, using the correct list tag can clearly tell the browser, software or display device "This group of items is a list!", which is a semantic tag. The meaning is to structure the content according to the categories to which they belong.
Block-level and inline: HTML elements can be divided into two types: block-level and inline. Block-level elements will start on a new line and end with a line break, while inline elements will be displayed on the same line as other inline elements. Block-level elements can include other block-level elements. and inline elements, and inline elements cannot contain block-level elements.
Block-level elements include:,-
,
The appearance of the dot symbol can indeed help solve the line wrapping problem to a certain extent. Each food item will have a small dot symbol on the left. If an item is too long to wrap, there should be no small dot symbol next to it. It is obvious that this is not a new project, but method B still has the problem of unexpected results: it does not meet the standards.
Please check it
According to W3C’s XHTML 1.0 specification, all tags must be closed at the end — It would be a shame if we continued to use the above example and left all
Method C is closer to the perfect solution, but it still fails miserably, and the reason is still very obvious: it still does not meet the standard markup grammar.
We have closed the - open!

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.

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.


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

SublimeText3 Linux new version
SublimeText3 Linux latest version

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

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

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.
