Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the basics of html and css

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article focuses on "what are the basics of html and css". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let the editor take you to learn "what are the basics of html and css"?

Html is a hypertext markup language (English full name: HyperText Markup Language, abbreviated as: HTML) is a standard markup language for creating web pages.

Css is a cascading style sheet (English full name: Cascading Style Sheets) is a computer language used for file styles such as html and xml. CSS can not only modify the web page statically, but also format the elements of the web page dynamically with various scripting languages.

one。 Basic content:

Tag = start tag + content + end tag

Tags can be nested, for example, page body tags contain title tags, paragraph tags.

Some tags have attributes and specific formats. Take the a tag as an example, where make is the attribute of the tag in xxxx.

Elements that are designed to have no content are called void elements. When you need to use void elements, you only need to use a start tag, which is a convenient abbreviation to reduce the number of tags in html.

two。 The use and meaning of commonly used tags:

The document type definition of html5, which is written to the beginning of the html file

Mark the beginning and end of the html page

Information about tagging pages

Tag specifies the character encoding, which is written to all other elements in the element

Specify a title for the page, and the content in the tag appears at the top of the browser

Tag the main content of the page

The content of the intermediate xxx is the content of the comment

When writing html, separate the header from the body of the page.

The main title is the subtitle, and the font is from big to small.

Start a paragraph

Tags define block references, and all text between them is separated from regular text, often indented on the left and right sides (increasing the margin), and sometimes italic. That is, block references have their own space

Insert a newline character

Tags define a short reference, and browsers often insert quotation marks around such references

What you need to know (some of the elements discarded in the old version and those that are not recommended, so that you can see them and understand their meaning)

Define an ordered list

Tag defines an unordered list

Tags define list items, and tags can be used in ordered and unordered lists ()

The tag defines a list of descriptions, which are used with (define project / name) and (describe each project / name)

The tag tells the browser to represent the text as highlighted, which for all browsers means displaying the text in italics

The bgcolor property sets the page color, and the text property sets the text color

Xxxx uses font elements to change fonts

Center the text surrounded by it horizontally

Some character entities

Display as >

©right is displayed as ©

three。 A simple html framework

Hello Wrld!

Demo file, the page shows hello world!

Hello Wrld!

four。 Insert a link in the page

Used to create links to other pages, the content in the element is the link text, which is underlined in the browser to indicate that it is clickable, for example:

(link text)

The href property points to the path of the linked file

Text description of the link page required by the rirle attribute

Add the id attribute to specifically point to a title of a link, for example:

Xxxxx

And synchronize the title on the page, and the identifier used for the link should be consistent with the identifier setting of the title

Xxxxx

Add the target attribute so that the browser opens the link as a separate window instead of the same window, for example:

Xxxxxxxxx

If you do not add the target attribute, the browser will open the link in the same window when you click the link. If you add this attribute, the browser will open the link in a separate window.

five。 Insert an image into the page

Marked to display the image on the page, xxx is the path or url of the picture

The alt= "xxx" attribute is the text that describes the content of the image, and if the image cannot be displayed, it will be replaced with this text.

The width- "xxx" attribute tells the browser to display the width of the image on the page

The height= "xxx" attribute tells the browser how high the image is displayed on the page.

At this point, I believe you have a deeper understanding of "what are the basics of html and css?" you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report