Help with closing tags?

Status
Not open for further replies.

Brackson

卍卍卍卍卍卍卍卍卍卍卍
Jun 20, 2013
262
46
I'm making a template, and I just noticed that some templates online use this method of closing link/meta tags.
HTML:
<link rel="stylesheet" type="text/css" href="style.css" />
I generally close my link/meta tags like this.
HTML:
<link rel="stylesheet" type="text/css" href="style.css">

Which way is conventional/right?
 

Blasteh

big tits
Apr 3, 2013
1,156
521
I'm making a template, and I just noticed that some templates online use this method of closing link/meta tags.
HTML:
<link rel="stylesheet" type="text/css" href="style.css" />
I generally close my link/meta tags like this.
HTML:
<link rel="stylesheet" type="text/css" href="style.css">

Which way is conventional/right?
I don't know about anyone else but I use
Code:
<link rel="stylesheet" type="text/css" href="style.css">
Always worked for me .
 

Ecko

23:37 [autobots] -!- eckostylez [[email protected]]
Nov 25, 2012
1,398
962
/> is valid XHTML.


Void elements only have a start tag, which contains any HTML attributes. They may not contain any children, such as text or other elements. Often they are place holders for elements which reference external files, such as the image (<img/>) element. The attributes included in the element will then point to the external file in question. Another example of a void element is the link element, for which the syntax is
<link rel="stylesheet" href="fancy.css" type="text/css">

This link element points the browser at a style sheet to use when presenting the HTML document to the user. Note that in the HTML syntax, attributes don't have to be quoted. When using the XML syntax (XHTML), on the other hand, all attributes must be quoted, and a trailing slash is required before the last angle bracket:
<link rel="stylesheet" href="fancy.css" type="text/css" />
 
Status
Not open for further replies.

Users who are viewing this thread

Top