Line break tag inserts a single line break:
< p > The first line. < br > The second line (close to the first one). p >
Result:
The first line.
Second line (close to the first one).
Note: sometimes you may see this tag written:
or
. It performs the same function (slashes make the tag readable in XHTML).
This tag identifies important text, meaning that the text will be highlighted. However, CSS can be used to display different text . However, you can use to bold text.
< strong > Very important things you want to say. strong >
Result:
Very important things you want to say.
If you are familiar with tags for bold text, you can still use it. However, there is no guarantee that it will continue to function in future versions of HTML, but for now, it still works.
Like cards and , and the same. The tag identifies the text to be emphasized, meaning it will be italicized. Again, use CSS to make the text emphasized differently.
< em > An emphasized line. em >
Result:
An emphasized line.
The card is still active, but may not be available for future versions of HTML.
A link tag or anchor for creating links. A simple link is as follows:
The "href" attribute determines the destination of the link. In many cases, this will be another website. It can also be a file like image or PDF file. Other useful properties include "target" and "title". The target attribute is used to open a link in a new tab or window, as follows:
The "title" attribute creates a tooltip. Hover over the link below to see what it means.
If you want to embed an image in your page, you will need to use the image tag. The easiest way to use it is to simply add the source of the image in the "src" attribute, as follows:
< img src = "/photos/image/2017/10/23/code-html-3.jpg " >
Result:
However, there are some other properties that users can use such as 'height' 'width' and "alt".
< img src = "/photos/image/2017/10/23/code-html-3.jpg " width = " 320 " alt = " the name of your image " >
Result:
The "height" and "width" attributes determine the height and width of the image. In general, one dimension should be set, the other will be automatically corrected. If both are used, the image will be distorted or deformed.
The "alt" tag tells the browser which text to display if the image is not displayed and it is best to include any image. If someone has a particularly slow connection or uses an old browser, they may still be able to see what is on your site.
The sorted list tag allows you to create an ordered list. In general, you will receive a numbered list. Each item in the list needs a category tag (
< ol > < li > First thing li > < li > Second thing li > < li > Third thing li > ol >
Result:
In HTML5, you can use
Unordered lists are much simpler than ordered lists.
< ul > < li > First item li > < li > Second item li > < li > Third item li > ul >
Result:
The unordered list also has the "type" attribute and you can set it to "disc", "circle" or "square".
If you want to use rows and columns to segment information on the page, you can use some tags to create and edit tables. Take a look at this example:
< table > < tbody > < tr > < th > First column th > < th > Second column th > tr > < tr > < td > Row 1, column 1 td > < td > Row 1, column 2 td > tr > < td > Row 2, column 1 td > < td > Row 2, column 2 td > tbody > table >
Each tag includes a title (you can sometimes see them wrapped in tags). The card sets the body of the table. The tag creates a new table row and the tag identifies a cell in that row.
When quoting a website or another person's words to make a difference with the rest of the document, you can use the blockquote tag. All you need to do is leave the citation in the tag open and close the blockquote.
< blockquote > I must not fear. Fear is the mind-killer. Fear is the little-death that brings total obliteration. I will face my fear. I will permit it to pass over me and through me. And when it has gone past I will turn the inner eye to see its path. Where the fear has gone there will be nothing. Only I will remain. blockquote >
Result:
I phải không fear. Fear is a mind-killer. Fear là nhỏ-death mà sẽ có Total obliteration. I sẽ mặt không fear. I sẽ phép nó để pass qua bạn và qua me. Và khi nó đã bỏ qua past vào, sẽ chuyển lại kích cỡ ảnh trong ảnh để xem đường dẫn. Where the fear đã bị bỏ qua sẽ không. Only I will remain.
The exact format used may depend on the browser you are using or the site's CSS. But the card remains the same.
With these 17 HTML tags you can create a simple website. To see how these tags are matched, you can load the HTML template and open it in the browser or in a text editor to see exactly how this code works.