### 22.6.3 Customizing the CSS link tag

The generic CSS link tag Mif2Go inserts in your HTML output looks like this:

<link rel="stylesheet" href="MyStyles.css" type="text/css">

Suppose you want to specify additional properties for the CSS file, such as media type. First, you must prevent Mif2Go from writing the generic link tag:

[CSS]

WriteCssLink=No

To specify the link yourself, assign it to the <head> element:

[Inserts]

; You must type the following all on one line:

Head=<link rel="stylesheet" href="MyStyles.css" type="text/css" media="screen">

As an alternative, you could reference the link as a macro (see §28.1 Defining and invoking macros):

[Inserts]

Head=<$MyCSSLink>

[MyCSSLink]

<link rel="stylesheet" href="MyStyles.css" type="text/css" media="screen">

You could even go a step further, and provide a macro variable (see §28.3 Using macro variables) for the value of the attribute, so you can change the value in just one place:

[MyCSSLink]

<link rel="stylesheet" href="MyStyles.css" type="text/css" media="<$$MediaType>">

[MacroVariables]

MediaType=screen

| 22.6.2 Changing CSS files in the middle of a document |  | 22.6.4 Using an alternate CSS link tag for Netscape 4 |