Style properties in HTML
To define the style for the element in HTML, we use the style attribute, which has the following structure.
- dactinh is the property (property) of CSS
- giri is the value of CSS
See also: How to use CSS to style HTML pages
Background color in HTML
The background-color
is used to define the background color for elements in HTML. This is an example of setting a blue background color for the page.
Quản trị mạng Network administrator
Network administrator
Text color in HTML
The color
feature is used to define the font color for elements in HTML.
n học HTML
Paragraph h
Read the HTML text color.
Font in HTML
The font-family
is used to define the font used for HTML elements.
Learn HTML trên Quản trị mạng.
Study HT
ML on Network Administrator.
Font size in HTML
The font-size
is used to define the font size for HTML elements.
Học HTML trên Quản trị mạng.
They
c font size in HTML on Network Administrator.
Align text in HTML
The text-align
is used to align text for elements in HTML.
Văn bản nằm giữa trang. Text is in the middle of the page.
Text is in the middle of the page.
Show all the above code on Chrome browser
Last lesson: Text in HTML
The following article: Format text in HTML
You should read it
May be interested
- 5 steps to learn a dynamic HTML web component profilehtml is an important part of websites we still use every day. however, not everyone can understand how a website is structured.
- Basic examples of HTMLin the previous html lesson, you know which tools to use to write html code, how to save and open html files. this article will give some basic examples of html text.
- eQuiz - Multiple choice test on HTML knowledgein this test, we will proceed with the small html test, there will be 30 questions in total with no response time, you must choose the answer in each question. can continue to the next sentence.
- How to insert CSS to create styles for HTML pageswhen the browser reads the format file (stylesheet), it will format the html text according to the information in that format file.
- ID selector in CSSin css, id is used to style the element with the specified id.
- Why write neat and organized HTML?you will get many benefits from writing clean and precise html code. here's why it's a good idea to write optimal html code.
- HTML formthe form in html contains form elements - the element types that take input data such as filling in text fields, checkboxes, buttons, submit buttons ...
- Text in HTMLthe element in html is used to define a paragraph of text.
- Elements in HTMLthe html element usually goes in pairs, including the opening tag, closing tag, and the content inside the two tags.
- Symbol - Icon in HTMLhtml has many mathematical, technical and monetary symbols that cannot be used to write.